how to detect incoming Skype/Viber call
Asked Answered
P

1

6

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?

Proteus answered 28/4, 2014 at 10:12 Comment(1)
Check the solution here. #22905014Hectic
D
7

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

Danelaw answered 28/4, 2014 at 10:16 Comment(4)
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_CALLProteus
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.