我TestApp其啓動活動有以下代碼:行動意圖造成ActivityNotFoundException同時開始另一個活動
public void startOperaView() {
Intent browserIntent = new Intent("org.droidtv.nettvbrowser.VIEW");
Uri luri = Uri.parse("connectedplanet.tv/olvs/test");
//browserIntent.setClass(getApplicationContext(), Browser.class);
//browserIntent.setAction("org.droidtv.nettvbrowser.VIEW");
browserIntent.setType("application/vnd.droidtv.sta");
browserIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
| Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
browserIntent.setData(luri);
startActivity(browserIntent);
}
與封裝「org.droidtv.nettvbrowser」具有以下AndroidManifest.xml文件:
<activity
android:name="org.droidtv.nettvbrowser.Browser"
android:configChanges="locale"
android:label="@string/app_name" >
<intent-filter>
<action android:name="org.droidtv.nettvbrowser.VIEW" />
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="application/vnd.droidtv.sta" />
</intent-filter>
</activity>
奇怪的部分是,如果我在意圖中指定實際的軟件包名稱,它似乎工作正常,只有動作意圖是拋出這些errors.Any幫助將不勝感激。謝謝。
我用過Android:出口標籤了。沒有運氣。我仍然得到同樣的錯誤。 – harshalizee 2013-04-08 08:55:03
你可以嘗試分離你的兩個意圖行動/類別? – Robin 2013-04-08 09:00:16
你能說說你的意思嗎?我是Android新手。 – harshalizee 2013-04-08 09:12:55