0
我正在一個ActivityNotFound例外,像這樣的電話:Android的隱式意圖定製mime類型
Intent displayModule = new Intent(Intent.ACTION_MAIN);
displayModule.addCategory(Intent.CATEGORY_DEFAULT);
displayModule.setType("application/x-content");
displayModule.putExtra(Modules.Plan_ID, holder.planId);
displayModule.putExtra(Modules.Module_ID, holder.moduleId);
startActivity(displayModule);
添加默認的類別不有所作爲。
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW typ=application/x-content (has extras) }
或
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW cat=[android.intent.category.DEFAULT] typ=application/x-content (has extras) }
當我試圖引用此活動:
<activity android:name=".ContentActivity" >
<intent-filter>
<action android:name="android.intent.action.VIEW" >
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="application/x-content" />
</action>
</intent-filter>
</activity>
此外,如果它幫助我在一個片段
告訴我你的電話,開始活動 – confucius 2012-03-26 07:38:51
我有包括來自logcat的頂部爲理由線。無論如何,我已經更新了這個問題 – 2012-03-26 17:52:39