我正在从一个模拟器向另一个模拟器发送二进制短信,同时发送Galaxy Nexus API 22.发送邮件,但出现三个问题:
发件人(主要活动onCreate):
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
SmsManager.getDefault().sendDataMessage(
"5556",
null,
(short) 2345,
"This is a binary SMS!".getBytes(),
null,
null);
}
});
接收者的清单条目:
<receiver
android:name=".Receiver"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.DATA_SMS_RECEIVED" />
<data
android:scheme="sms"
android:host="*"
android:port="2345" />
</intent-filter>
</receiver>
Receiver是binary SMS receiver from a tutorial的副本。