[英]Launch to app not work with intent-filter
我閱讀了有關意圖過濾器的所有主題,並從瀏覽器測試了應用程序的所有方法,但是沒有用。 這是我的清單:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ir.nooraei.afsaneirani.android.graphic"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="22" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar" >
<activity
android:name="com.main.da"
android:configChanges="orientation|keyboardHidden"
android:label="@string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http"/>
<data android:host="anysite.com"/>
<data android:host="google.com"/>
<data android:host="www.google.com"/>
<data
android:host="bestnews.com"
android:scheme="http" />
</intent-filter>
</activity>
<activity
android:name="com.main.da"
android:label="@string/title_activity_splash_screen" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
我使用www或不使用www的所有站點測試此代碼。 但不起作用:(。任何人都可以幫助我嗎?
將以下行添加到您的意圖過濾器中
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.