【问题标题】:Android sending outgoing SMS from EmulatorAndroid从模拟器发送传出短信
【发布时间】:2014-01-09 20:35:24
【问题描述】:

我正在开发一个#Android 应用程序,我知道使用#Telnet 可以让我模拟将传入的短信发送到模拟器。有谁知道是否可以从模拟器发送外发短信?

【问题讨论】:

    标签: android sms telnet


    【解决方案1】:

    这是你想要的吗?

    发送短信的代码

    PendingIntent pi = PendingIntent.getActivity(this, 0,
            new Intent(this, SMS.class), 0);                
    SmsManager sms = SmsManager.getDefault();
    sms.sendTextMessage(phoneNumber, null, message, pi, null);
    

    使用模拟器编号(设备的左上角,例如 5554、5556)您可以做到这一点。输入此号码作为电话号码并发送消息。

    另见: Send a message from one Android emulator to another?

    【讨论】:

    • 我知道你可以将它从模拟器发送到模拟器。我在启动第二个模拟器时遇到了问题,但也许如果我减少每个模拟器上的 ram 就可以了。我希望有一种方法可以将短信从模拟器发送到实际的物理电话。根据我的阅读,如果无法访问该服务似乎不太可能。
    猜你喜欢
    • 2017-03-05
    • 1970-01-01
    • 2017-07-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-04-29
    • 1970-01-01
    • 2023-03-05
    相关资源
    最近更新 更多