我已经从我的应用程序启动了电子邮件活动..我的问题是我如何知道是否发送了电子邮件
try {
Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("text/html");
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,"Check out this play from http://www.iplaybook.net iPlayBook ");
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT,"This play was created using<a href='http://www.iplaybook.net'> iPlayBook.</a>");
final PackageManager pm = getPackageManager();
@SuppressWarnings("static-access")
final List<ResolveInfo> matches = pm.queryIntentActivities(emailIntent, pm.MATCH_DEFAULT_ONLY);
ResolveInfo best = null;
for (final ResolveInfo info : matches)
{
if (info.activityInfo.name.toLowerCase().contains("mail"))
best = info;
}
if (best != null)
{
emailIntent.setClassName(best.activityInfo.packageName, best.activityInfo.name);
startActivit(emailIntent);
}
}
catch(Exception e) { }
}
请帮助..