void stopOperation(ANotificationReceiver nRec) { nRec.Stop(); if (useNotifications) { notificationManager.ReleaseAudioResources(); status.Text = "Released"; } }
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; } }