2013-07-22 143 views
1

我正在創建一個應用程序來捕捉一個android梁,並啓動我的應用程序,而不是指定的應用程序。例如:打開一個網頁,但我的應用程序啓動。Android梁意圖過濾器

我嘗試設置與NDEF意圖過濾清單,但它似乎並沒有趕上樑和啓動我的活動。

 <intent-filter> 
      <action android:name="android.nfc.action.NDEF_DISCOVERED" /> 
     </intent-filter> 

任何幫助表示讚賞。謝謝!

回答

3

下面的動作發生這樣的:

<category android:name="android.intent.category.DEFAULT" /> 
    <data android:scheme="http" 
     android:host="example.com" 
     android:pathPrefix="" /> 

欲瞭解更多信息:http://developer.android.com/guide/topics/connectivity/nfc/nfc.html#well-known-uri

+0

輝煌的感謝! – jaesanx

+0

作爲後續,我們可以在數據屬性中指定uri作爲mimetype嗎? – jaesanx

+1

懷疑它會工作,我還沒有測試過,但如果你可以使用類似的東西: