观察短信发送模拟器应用 [英] Observe sms sending app in emulator

查看:108
本文介绍了观察短信发送模拟器应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法从仿真器读取发送SMS?

Is there a way to read outgoing sms from the emulator?

在logcat的我看到这条消息:

In the logcat I see this message:

D/SmsStorageMonitor(  738): SMS send size=0 time=1327423357467

有没有办法让接收器和内容?

Is there a way to get the receiver and the content?

即将离任的短信似乎并没有被保存在仿真器。这意味着,Messenger应用表明我不是发短信。

The outgoing sms seems not to be saved in the emulator. That means that the messenger app shows me no sms.

推荐答案

是只需在您的应用程序创建一个服务,并遵守所有发送SMS不仅仅是指低于code。

Yes just create one service in your app and observe all outgoing sms just refer below code.

public class SMSObserver extends BroadcastReceiver 
{
    static final String ACTION ="android.provider.Telephony.SMS_SENT";

    @Override 
    public void onReceive(Context context, Intent intent) 
    { 
        if (intent.getAction().equals(ACTION)) 
        {
                 //your action code here
        }            
    }

这篇关于观察短信发送模拟器应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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