jitsi / jitsi-android

Jitsi for Android is an Android port of the Jitsi project: The most feature-rich communicator with support for encrypted audio/video, chat and presence over SIP and XMPP
Apache License 2.0
415 stars 258 forks source link

Feature: Stop music on call and duck on ringing #39

Open 459below opened 8 years ago

459below commented 8 years ago

At the moment jitsi-android doesn't care for music. I would like to implement a behavior as such:

-Duck music while ringing on incoming or outgoing call -Stop music if the actual call takes place

459below commented 8 years ago

I did a first implementation here which I'm going to start testing/using. I'll do a PR as soon as it can be deemed stable.

459below commented 8 years ago

CyanogenMod's Apollo Music Player doesn't respond to the intent. I grepped through Apollo's code and it doesn't seem to be handling the "com.android.music.musicservicecommand" intent at all. I might have to fake key inputs a la "KeyEvent.KEYCODE_MEDIA_PAUSE" to get it to pause its playback.

Players like AOSP's Music, Google's Play Music and Samsung's Music comply, though.