I am developing a music app and for that I need to detect incoming calls (Phone, Skype, Viber etc) in order to stop the playing song. I can detect GSM calls using PhoneState listener. Is there any way to detect data/VoIP (Skype, Viber) calls?
how to detect incoming Skype/Viber call
You shouldn't need to detect anything so specific, but rather manage audio focus correctly. Please see this guide on how to do that: https://developer.android.com/training/managing-audio/audio-focus.html
Thanks, I want to know whenever phone rings by Skype or Viber call. for which stream should I request? STREAM_ALARM, STREAM_DTMF, STREAM_MUSIC,STREAM_NOTIFICATION, STREAM_RING, STREAM_SYSTEM, STREAM_VOICE_CALL –
Proteus
Seems like
STREAM_RING
and STREAM_VOICE_CALL
sound like good candidates. Try them out and see what happens. You can probably request more than one stream I would think. –
Danelaw @Danelaw Hi karakuri, do you get solution for detect incomming/outgoing calls for Skype. –
Judi
No. I don't see how you could possibly do that. –
Danelaw
© 2022 - 2024 — McMap. All rights reserved.