开发者

Data SMS Message body not received in Android phones

开发者 https://www.devze.com 2023-02-06 10:16 出处:网络
When i send a data SMS to Android pones, the message body is not received. It is trigerring onRe开发者_运维百科ceived method of BroadcastListner and i am able to get senders address but the message bo

When i send a data SMS to Android pones, the message body is not received. It is trigerring onRe开发者_运维百科ceived method of BroadcastListner and i am able to get senders address but the message body is not received. It just returns null. Does anybody faced similar issues?

my manifest file includes all the entries fro receiving Data SMS.

            <action android:name = "android.intent.action.DATA_SMS_RECEIVED"/>
               <data  android:scheme="sms"/>  
                <data android:host="localhost"/> 
                <data android:port="16000"/>

        </intent-filter> 
    </receiver>

Does anyone know what might be the problem?


How do you extract your message body? For data sms, you should use 'getUserData() instead of 'getMessageBody()' to get the message body.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号