我有followind代码打开其他应用活动:
Intent shortcutIntent = new Intent(activitate, MapFragment_.class);
shortcutIntent.putExtra("instantly", true);
shortcutIntent.putExtra("data", address);
shortcutIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
sendBroadcast(shortcutIntent);
在我的清单中:
<activity
android:name=".MapFragment_.class"
android:authorities="com.mobi.android.xyz"
>
</activity>
我回忆道:
android.content.ActivityNotFoundException: Unable to find explicit activity class
出了什么问题?
答案 0 :(得分:0)
您尚未使用startActivity()。添加此
Intent shortcutIntent = new Intent(activitate, MapFragment_.class);
shortcutIntent.putExtra("instantly", true);
shortcutIntent.putExtra("data", address);
shortcutIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(shortcutIntent);