1

Firebase動態鏈接處理錯誤:點擊動態鏈接,它打開啓動器活動而不是使用意向過濾器(DynamicLinkHandlerActivity)的活動。Firebase動態鏈接處理錯誤

發射活動:

<activity android:name=".SplashScreen" 
    android:screenOrientation="portrait" 
    android:theme="@style/AppTheme.NoActionBar"> 

    <intent-filter> 
     <action android:name="android.intent.action.MAIN" /> 
     <category android:name="android.intent.category.LAUNCHER" /> 
    </intent-filter> 

</activity> 

動態鏈接處理程序:

<activity android:name=".LinkHandler" > 

    <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:host="dynamic.link.code" 
      android:pathPattern="/?link" 
      android:scheme="https" /> 

    </intent-filter> 

    <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:host="dynamic.link.code" 
      android:pathPattern="/?link" 
      android:scheme="http" /> 

    </intent-filter> 

</activity> 

回答

0

你應該在你的清單,而不是動態鏈接使用鏈接值的意圖過濾器。

例如,對於動態鏈接:https://appcode.app.goo.gl/?link=https://example.com& ...

你解決活動意圖過濾應該是

<data android:scheme="https" android:host="example.com"/>