1

我不得不設置意圖過濾器中的manifest.xml,如如下:Android的6 - 無法打開應用網址從鉻

<activity 
      android:name="indexgifto.android.ui.viewcontrollers.SplashScreenActivity" 
      android:label="@string/application_name" 
      android:launchMode="singleTop" 
      android:windowSoftInputMode="adjustNothing" 
      android:theme="@android:style/Theme.Translucent.NoTitleBar" 
      android:screenOrientation="portrait" > 
     <intent-filter> 
      <data android:scheme="gifto"/> 
      <data android:scheme="http" /> 
      <data android:host="www.gifto.net"/> 
      <action android:name="android.intent.action.VIEW" /> 
      <category android:name="android.intent.category.DEFAULT" /> 
      <category android:name="android.intent.category.BROWSABLE" /> 
      <action android:name="android.intent.action.MAIN" /> 
      <category android:name="android.intent.category.LAUNCHER" /> 
     </intent-filter> 
    </activity> 

當我執行「AM開始http://www.gifto.net/go.php?c=xlh201」應用程序成功地與所需的數據打開。但是,當通過Chrome打開相同的URL時,只會打開服務器頁面。在這兩種情況下的Android 4中,我的應用程序能夠從這個URL開始。我必須在android 6中修復哪些內容?

回答

0

這工作對我來說你嘗試一次,如果你爲你工作。

<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="www.youtube.com" android:scheme="http" android:pathPrefix="http"></data> 
    </intent-filter>