Can anyone help me to know how to stop the background music playing on android once I open my application in Android (I'm using Appcelerator Titanium)
Asked
Active
Viewed 482 times
1 Answers
1
Titanium Mobile doesn't integrate Android's Audio Focus functionality, as indicated by the lack of Audio Focus-related method calls. Therefore, you aren't able to request permanent audio focus using the framework itself, which would stop audio playback from other active apps.
You can create a Titanium Module that implements this functionality though.
You may have some modest success creating intents for specific applications, for example, sending a pause intent to com.android.music.musicservicecommand
, the default music player. See these resources:

Community
- 1
- 1

Jacob Budin
- 9,753
- 4
- 32
- 35