【发布时间】:2014-01-09 20:35:24
【问题描述】:
我正在开发一个#Android 应用程序,我知道使用#Telnet 可以让我模拟将传入的短信发送到模拟器。有谁知道是否可以从模拟器发送外发短信?
【问题讨论】:
我正在开发一个#Android 应用程序,我知道使用#Telnet 可以让我模拟将传入的短信发送到模拟器。有谁知道是否可以从模拟器发送外发短信?
【问题讨论】:
这是你想要的吗?
发送短信的代码
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)您可以做到这一点。输入此号码作为电话号码并发送消息。
【讨论】: