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"/>