开发者

How to handle incoming call events in Android

开发者 https://www.devze.com 2023-01-05 13:18 出处:网络
Does anybody know if there is any event to handle incoming calls? I\'m developing an ap开发者_如何学编程p that streams audio from the microphone and I would like to have a listener that stops the reco

Does anybody know if there is any event to handle incoming calls?

I'm developing an ap开发者_如何学编程p that streams audio from the microphone and I would like to have a listener that stops the recording, etc when there is an incoming call, and that restarts the process when the telephone call is over.


You can create a BroadcastReceiver and listen for the TelephonyManager#ACTION_PHONE_STATE_CHANGED action.

0

精彩评论

暂无评论...
验证码 换一张
取 消