如何检测传入的Skype /电话的Viber电话、Skype、Viber

由网友(Robert 光辉和著名的)分享简介:我开发一个应用程序的音乐和我需要以停止播放歌曲,以检测来电(电话,Skype和Viber的等等)。我能察觉使用PhoneState监听GSM电话呼叫。有什么方法来检测数据/网络电话(Skype和Viber的)调用?I am developing a music app and for that I need to d...

我开发一个应用程序的音乐和我需要以停止播放歌曲,以检测来电(电话,Skype和Viber的等等)。我能察觉使用PhoneState监听GSM电话呼叫。有什么方法来检测数据/网络电话(Skype和Viber的)调用?

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?

推荐答案

您应该不需要任何检测这么具体,而是正确地管理音频焦点。请参阅有关如何做到这一点本指南:https://developer.android.com/training/managing-audio/audio-focus.html

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

阅读全文

相关推荐

最新文章