-
-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it necessary to call AudioSession.setActive(true) ? #43
Comments
Hi @jdnew , As for other capabilities, audio_session just wraps Apple's AVAudioSession API and Android's AudioManager API, so I would suggest consulting the source documentation from Apple and Google to see what is actually possible on each platform. If you find a method in one of those two native APIs that will help you and you find that I haven't exposed it yet in this plugin, let me know and I'll add it. |
@ryanheise Thanks for you reply . Please look at this : Detect background audio playing on Android. On the audio_session project , I found that you have |
I've already implemented those. |
Well, do you want to wrap them to |
Yes it's a good idea to add more cross-platform convenience methods to |
In my app, I only want to detect whether another app is playing audio , so that I can toast something .
But if I only use
AudioSession.interruptionEventStream.listen
, if another app start to play music , I can't receive any event. However, if I callAudioSession.setActive(true)
, I will receive the interruption event. But that means it will stop the another app's playing audio .It seems that I need a API like
AudioSession.isOtherAudioPlaying()
。The text was updated successfully, but these errors were encountered: