我注意到我通过 Android 中的标准 SmsManager 发送的跟踪未决意图似乎没有在其中保留额外信息。例子:
Intent sentIntent = new Intent(SENT);
sentIntent.putExtra("value1", "foo"); // <- note this value
PendingIntent sentPI = PendingIntent.getBroadcast(this, 0, sentIntent, 0);
SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage(numberToSendTo, null, mMessageToSend, sentPI, null);
//... in the broadcastReceiver that catches the SENT intent ...
public void onReceive(Context arg0, Intent arg1) {
arg1.getExtras().getString("value1"); // <- nothing, no such key
}
有人可以测试一下吗,这种行为是故意的,我做错了,还是要为 Android 提交错误?