2012-09-04 92 views
0

我正在寫一個URL到某個NFC標籤以進行意圖過濾主機名 - 如果安裝了應用程序,請啓動該應用程序,或者在未安裝該應用程序的情況下提供一個鏈接到google-play。不幸的是只有瀏覽器出現:通過NFC上的URL啓動Android應用程序標籤

<intent-filter> 
<action android:name="android.intent.action.VIEW"></action> 
<category android:name="android.intent.category.DEFAULT"></category> 
<category android:name="android.intent.category.BROWSABLE"></category> 
<data android:host="example.com" android:scheme="http" /> 
</intent-filter> 

回答

2

的行動必須是不同的:

<intent-filter> 
    <action android:name="android.nfc.action.NDEF_DISCOVERED"></action> 
    <category android:name="android.intent.category.DEFAULT"></category> 
    <data android:host="example.com" android:scheme="http" /> 
</intent-filter> 

仍然沒有所需的權限

相關問題