Intent intent = new Intent();
intent.setClassName("another_app_package_name","another_app_package_name.class_name_in_that_package");
startActivity(intent);
變得ActivityNotFoundException?從不同的應用程序活動調用另一個應用程序活動?
如何解決這個問題?這個問題提前發佈,但沒有解決方案。我清單應用程序的活動被調用我也使用意向過濾器。
Activity to be called by some other application's activity
<activity
android:name="com.example.custompermission.PrivActivity">
android:permission="abc.permission.STARTMYACTIVITY">
<intent-filter >
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
你確定你能做到嗎?我不認爲你可以直接做到這一點。你可以通過廣播連接它們,但是像那樣? –