Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to detect incoming Skype/Viber call

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?

like image 984
SohailAziz Avatar asked Apr 28 '14 10:04

SohailAziz


1 Answers

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

like image 97
Karakuri Avatar answered Sep 30 '22 12:09

Karakuri