2
也許我誤解了如何Intent
s和intent-filter
s工作,但在我看來,這應該是一個簡單的例子。但是,它不起作用。意圖對象不觸發意圖過濾器
這裏是我發送意圖:
Intent i = new Intent(Intent.ACTION_VIEW);
i.setType("vnd.android.cursor.item/vnd.connectsy.event");
startActivity(i);
這裏是意圖過濾器:
<activity android:name=".events.EventView">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<data android:mimeType="vnd.android.cursor.item/vnd.connectsy.event" />
</intent-filter>
</activity>
最後,錯誤我recieving:
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW typ=vnd.android.cursor.item/vnd.connectsy.event }