예제 #1
0
 void stopOperation(ANotificationReceiver nRec)
 {
     nRec.Stop();
     if (useNotifications)
     {
         notificationManager.ReleaseAudioResources();
         status.Text = "Released";
     }
 }
예제 #2
0
            public void OnAudioFocusChange(AudioFocus focusChange)
            {
                switch (focusChange)
                {
                case AudioFocus.GainTransient:
                case AudioFocus.GainTransientMayDuck:
                case AudioFocus.Gain:
                    parent.StartAsync();
                    SetStatus("Granted");
                    break;

                case AudioFocus.LossTransientCanDuck:
                case AudioFocus.LossTransient:
                case AudioFocus.Loss:
                    parent.Stop();
                    SetStatus("Removed");
                    break;

                default:
                    break;
                }
            }