与Android的API,我可以模拟/创建来电? [英] With Android APIs, can I simulate/create an incoming call?

查看:181
本文介绍了与Android的API,我可以模拟/创建来电?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Android的API的,我可以模拟/创建来电?这不是用于测试目的。其实我是想我的应用程序调用手机本身,并把它响。

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.

推荐答案

为了创建一个模拟来电,您将需要播放与此相关的意图。如何处理来电的一些信息,可以发现的此处。实际上,您将需要在自己创建广播意图,并通过在必要的临时演员。创建具有额外意图的一个例子,以及如何处理它们在你的应用程序,可以发现的这里

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.

这篇关于与Android的API,我可以模拟/创建来电?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆