我可以在Android中实现对某人的自动呼叫吗? [英] Can I implement automatic call to someone in Android?

查看:83
本文介绍了我可以在Android中实现对某人的自动呼叫吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从我的android手机实现自动通话.如果我也为特定的号码和日期设置了消息,那么我的Android手机应自动拨打该号码.是否可以在没有任何用户交互的情况下通过我的Android手机拨打任何号码?

I want to implement an automatic call from my android phone. If I set message for a particular number and date as well, then my android phone should call that number automatically. Is it possible without any user interaction to call on any number via my android phone?

推荐答案

是可以的.通话代码简单明了.

Yes it is possible. The code for call is straight forward.

Intent intent = new Intent(Intent.ACTION_CALL);   
intent.setData(Uri.parse("tel:09999"));    
startActivity(intent);

使用您的电话号码代替09999. 不要忘记指定在Android Manifest.xml中调用的权限

Use your number in place of 09999. Don't forget to specify the permission to call in Android Manifest.xml

这篇关于我可以在Android中实现对某人的自动呼叫吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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