下面几页,从我执行<代码>onOptionsItemS selected()时起,用电子邮件地址、主题和填满前的机把用户从我的手表带至邮件客户。 我用这一简单方式让用户给我反馈。
String uriText =
"mailto:" + emailAddress +
"?subject=" + subject +
"&body=" + body;
Intent emailIntent = new Intent(Intent.ACTION_SENDTO, Uri.parse(uriText));
startActivity(Intent.createChooser(emailIntent, "Pick an email app:"));
当邮件收发时(关于我的Nexus S with 4.0.4),LogCat产出如下,我可以说明为什么;谷歌和SO搜索createChooser undgisterReceiver似乎没有结果,我可以找到许多实例createChooser (
),这些例子也称作unregisterReceiver (
)。
04-08 21:26:19.094:E/ActectiveThread(27894): Activities com.android.internal.app.ChooserActative has 漏掉了原先在此登记的IntentReceiver com.android.internal.app.ResolverActative$1@4150aac8。 难道你没有向未出庭者发出呼吁吗?
04-08 21:26:19.094:E/ActativeThread(27894):android.app. IntentReceiverLeaked: Activities com.android.internal.app.ChooserActative has 漏掉了原先在此登记的IntentReceiver com.android.internal.app.ResolverActative$1@4150aac8。 难道你没有向未出庭者发出呼吁吗?
04-08 21:26:19.094:E/ActativeThread(27894): at android.app.LoadedApk$ReceiverDissigner. (LoadedApk.java:763)
This feels like an Android bug because my own code doesn t call registerReceiver()
, so why is Android complaining that I need to call unregisterReceiver()
?