With Android APIs, can I simulate/create an incoming call?

て烟熏妆下的殇ゞ 提交于 2019-12-12 12:31:05

问题


With Android APIs, can I simulate/create an incoming call? This is not for testing purposes. I actually want my app to call the phone itself and have it ring.


回答1:


In order to create a "mock" incoming call, you would need to broadcast the intent associated with this. Some info on how to handle an incoming call can be found here. You will instead need to create the broadcast intent on your own, and pass in the necessary extras. An example of creating an intent with extras, and how to handle them in your app, can be found here.



来源:https://stackoverflow.com/questions/9050658/with-android-apis-can-i-simulate-create-an-incoming-call

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!