firebase / firebase-android-sdk

Firebase Android SDK
https://firebase.google.com
Apache License 2.0
2.28k stars 580 forks source link

Some mobile phones cannot directly open the APP by clicking the dynamic link. #5269

Closed Joooenn closed 1 year ago

Joooenn commented 1 year ago

Step 1: Describe your environment

Step 2: Describe the problem:

Some mobile phones cannot directly open the APP by clicking the dynamic link. https://github.com/liangzcn/OPEN-BLOG/assets/15683811/095b0e10-fd64-4eca-b152-440022ba24a4

Steps to reproduce:

  1. Share a link to Messenger in my App;
  2. Open Messenger and clicking on the share link does not open my App, but a pop-up window prompts the user to select the app shop or Google play to open my App;
  3. Choose app shop or Google play always open Google play, and click open can start my App.

What is causing this problem?

google-oss-bot commented 1 year ago

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

argzdev commented 1 year ago

Hi @liangzcn, thanks for reaching out. It seems that this issue might be related to #916. For better tracking, please continue your report there, I'll go ahead and mark this as duplicate. Thanks!

Joooenn commented 1 year ago

Hi @argzdev , Thanks Reply I checked #916 and found that my problem is different from it, Can you see the attached picture,when click on dynamic link, it's not that it doesn't work, but it prompts the user to choose the tool to open the App through a pop-up window, and it only appears on some mobile phones, which makes me feel strange.

argzdev commented 1 year ago

Hi @liangzcn, sorry for the delayed reply. The prompt is due to the app not being auto verified. You need to add it in your AndroidManifest file, something like this:

<intent-filter android:autoVerify="true">
    <action android:name="android.intent.action.VIEW"/>
    <category android:name="android.intent.category.DEFAULT"/>
    <category android:name="android.intent.category.BROWSABLE"/>
    <data android:host="example.com/link" android:scheme="http"/>
    <data android:host="example.com/link" android:scheme="https"/>
</intent-filter>

So your app will automatically open when it detects certain links that are indicated in the android:host. You may refer to our documentation for more details, and better explanation of the usage.

However, I have to inform you that the Firebase Dynamic Links service will be shutdown on August 25, 2025. In the meantime, only critical or security issues will be fixed in the SDK.

More at https://firebase.google.com/support/dynamic-links-faq