我的項目是一個下載管理器,打開一個鏈接下載的東西。 我想添加此功能,當我使用chrome Bower並點擊鏈接時,我的應用程序建議用戶使用它打開鏈接。我的應用程序不會顯示爲文件資源管理器中的建議?
我用
<category android:name="android.intent.category.DEFAULT"/>
,但沒有什麼效果。
這裏是我的清單:
<application
android:allowBackup="true"
android:icon="@drawable/gigaget"
android:label="@string/app_name">
<activity
android:name=".ui.main.MainActivity"
android:label="@string/app_name"
android:theme="@style/Theme.App.Blue"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="us.shandian.giga.intent.DOWNLOAD"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data
android:mimeType="application/*"
android:host="*"
android:scheme="http"/>
<data
android:mimeType="application/*"
android:host="*"
android:scheme="https"/>
</intent-filter>
</activity>
<activity
android:name=".ui.main.DetailActivity"
android:label="@string/app_name"
android:theme="@style/Theme.App.Blue">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".ui.web.BrowserActivity"
android:label="@string/browser"
android:theme="@style/Theme.App.Blue">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity-alias
android:name=".ui.web.BrowserActivity-share"
android:label="@string/open_with_gigaget"
android:targetActivity=".ui.web.BrowserActivity">
<intent-filter>
<action android:name="android.intent.action.SEND"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="text/*"/>
</intent-filter>
</activity-alias>
<activity
android:name=".ui.settings.SettingsActivity"
android:label="@string/settings"
android:theme="@style/Theme.App.Blue">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.nononsenseapps.filepicker.FilePickerActivity"
android:label="@string/app_name"
android:theme="@style/Theme.App.Blue">
</activity>
<service
android:name=".service.DownloadManagerService"/>
</application>
這個權限:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
爲什麼我不能看到我的應用程序下載像其他應用程序推薦的應用。 有幫助嗎?
您可以使用深層鏈接的活動清單。谷歌它 –
我sreach這幾種方式,但還是沒有結果@ [從瀏覽器攔截的鏈接,打開我的Android應用程序]的CoDFather – nsr
可能的複製(http://stackoverflow.com/questions/1609573/intercepting-links-from-the -browser到開我的,Android的應用程序) –