firebase / firebase-android-sdk

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

DynamicLink consider only default FirebaseApp #2177

Closed tplkn closed 1 year ago

tplkn commented 3 years ago

Describe your environment

Describe the problem

DynamicLink consider only the default firebase application, and it's not possible to use another instance of FirebaseApp

Steps to reproduce:

Relevant Code:

 FirebaseDynamicLinks.getInstance(FirebaseApp.getInstance("secondary"))
   .createDynamicLink()
  .setDomainUriPrefix(<domain from "secondary" firebase project>)
  .setLink("https://example.com")
  .buildShortDynamicLink()
  .addOnSuccessListener {
      //
  ].addOnFailureListener {
    //
  }

Link to related code https://github.com/firebase/firebase-android-sdk/blob/master/firebase-dynamic-links/src/main/java/com/google/firebase/dynamiclinks/DynamicLink.java#L99

if (FirebaseApp.getInstance() != null) {
     builderParameters.putString(
            KEY_API_KEY, FirebaseApp.getInstance().getOptions().getApiKey());
}
google-oss-bot commented 3 years ago

I found a few problems with this issue:

christibbs commented 3 years ago

Internal bug number 174064658.

aegis1530 commented 2 years ago

Same issue.

  1. Should I have to enable the default firebase project for dynamic link ? Or Can just enable the second project for firebase dynamic link?
  2. Can I use the url prefix created in second project for native short link API? I had received this error=400: Your project does not own Dynamic Links domain

Any updates for this bug? Thanks.

argzdev commented 1 year ago

Hi folks, we'd like 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