android.provider.Telephony.SMS_RECEIVED不可用。[英] android.provider.Telephony.SMS_RECEIVED not available

本文是小编为大家收集整理的关于android.provider.Telephony.SMS_RECEIVED不可用。的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

我正在尝试创建一个新的短信收到listner.

我已经拓展了这个问题,我发现的只是它需要

android.provider.telephony.sms_received

但它不存在于Android 2.2

如何收听新的传入消息是我的问题.!

推荐答案

您正在寻找android.provider.telephony.sms_received_action,它对应于字符串值android.provider.telephony.sms_received.

public static final String SMS_RECEIVED_ACTION =
                "android.provider.Telephony.SMS_RECEIVED";
签出这个问题是关于如何做的: http://stachoverflow.com/questions/1973071/broadcastreceiver -sms-receed

本文地址:https://www.itbaoku.cn/post/102483.html

问题描述

I'm trying to create a new SMS receive listner.

I have googled the problem and all I found was it requires

android.provider.Telephony.SMS_RECEIVED

but it doesnt exist in android 2.2

how to listen to new incoming messages is my question.!

推荐答案

You are looking for android.provider.Telephony.SMS_RECEIVED_ACTION that corresponds to string value android.provider.Telephony.SMS_RECEIVED.

public static final String SMS_RECEIVED_ACTION =
                "android.provider.Telephony.SMS_RECEIVED";

Check out this question on how to do it: http://stackoverflow.com/questions/1973071/broadcastreceiver-sms-received