广播接收器在Android的未接来电 [英] broadcast receiver for missed call in android

查看:265
本文介绍了广播接收器在Android的未接来电的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道什么是意图未接来电。其实我想发送短信的未接电话和进来的电话在我的应用程序。

Does anyone know what is the intent for missed call. Actually i want to send sms on missed call and incomming call in my application.

推荐答案

有没有具体的播出一个未接来电,AFAIK。

There is no specific broadcast for a missed call, AFAIK.

您可以看的<一个href="http://developer.android.com/reference/android/telephony/TelephonyManager.html#ACTION_PHONE_STATE_CHANGED"相对=nofollow> ACTION_PHONE_STATE_CHANGED 广播,等到从 EXTRA_STATE_RINGING 到 EXTRA_STATE_IDLE ,然后尝试检查 CallLog 内容提供商,看看呼叫被错过。我还没有尝试过这种方法,但它可能工作。

You can watch for ACTION_PHONE_STATE_CHANGED broadcasts, wait until the phone shifts from EXTRA_STATE_RINGING to EXTRA_STATE_IDLE, then try checking the CallLog content provider to see if the call was missed. I have not tried this technique, but it may work.

这篇关于广播接收器在Android的未接来电的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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