chemerisuk / cordova-plugin-firebase-dynamiclinks

Cordova plugin for Firebase Dynamic Links
55 stars 150 forks source link

Ionic + Android: Firebase dynamic links are not working with cordova-plugin-ionic installed #71

Closed lordonnance closed 2 years ago

lordonnance commented 4 years ago

cordova plugin ls output:

cordova-plugin-androidx 1.0.2 "cordova-plugin-androidx"
cordova-plugin-androidx-adapter 1.1.0 "cordova-plugin-androidx-adapter"
cordova-plugin-apprate 1.4.0 "AppRate"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-dialogs 2.0.2 "Notification"
cordova-plugin-email-composer 0.9.2 "EmailComposer"
cordova-plugin-facebook4 6.0.0 "Facebook Connect"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-filepath 1.5.1 "cordova-plugin-filepath"
cordova-plugin-firebase-analytics 4.3.0 "FirebaseAnalyticsPlugin"
cordova-plugin-firebase-dynamiclinks 4.4.0 "FirebaseDynamicLinksPlugin"
cordova-plugin-globalization 1.11.0 "Globalization"
cordova-plugin-googleplus 8.2.0 "Google SignIn"
cordova-plugin-inappbrowser 3.1.0 "InAppBrowser"
cordova-plugin-ionic 5.4.7 "cordova-plugin-ionic"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 4.0.1 "cordova-plugin-ionic-webview"
cordova-plugin-nativestorage 2.3.2 "NativeStorage"
cordova-plugin-screen-orientation 3.0.2 "Screen Orientation"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-taptic-engine 2.1.0 "Taptic Engine"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-plugin-x-socialsharing 5.6.0 "SocialSharing"
cordova-sqlite-storage 3.2.0 "Cordova sqlite storage plugin - cordova-sqlite-storage plugin version"
cordova-support-android-plugin 1.0.1 "cordova-support-android-plugin"
cordova-support-google-services 1.3.2 "cordova-support-google-services"
es6-promise-plugin 4.2.2 "Promise"

ionic info output:

Ionic:

   Ionic CLI                     : 6.6.0 (C:\Users\naonm\AppData\Roaming\npm\node_modules\@ionic\cli)
   Ionic Framework               : @ionic/angular 4.0.2
   @angular-devkit/build-angular : 0.12.4
   @angular-devkit/schematics    : 7.2.4
   @angular/cli                  : 7.2.4
   @ionic/angular-toolkit        : 1.5.1

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.1.0
   Cordova Plugins   : cordova-plugin-ionic 5.4.7, cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.0.1, (and 22 other plugins)

Utility:

   cordova-res : 0.13.0
   native-run  : 1.0.0

System:

   Android SDK Tools : 26.1.1 (C:\Users\naonm\AppData\Local\Android\Sdk)
   NodeJS            : v12.16.1 (C:\Program Files\nodejs\node.exe)
   npm               : 6.13.4
   OS                : Windows 10

Describe the bug

Android specific issue (works on iOS with both plugins installed). Firebase dynamic links are working fine without the cordova-plugin-ionic installed. After installing it, either with none, auto or background mode, Firebase dynamic links are not working anymore. The user is redirected to the application after clicking a Firebase dynamic link, but there nothing happens inside firebaseDynamicLinks.onDynamicLink subscription

To Reproduce

Setup Firebase dynamic links as described here (https://ionicframework.com/docs/native/firebase-dynamic-links) Setup cordova-plugin-ionic Listen to Firebase dynamic links like this :

   this.firebaseDynamicLinks.onDynamicLink().subscribe(
      (res: any) => {
        console.log ("Receiving Firebase DL", res)
        console.log ("deepLink", res.deepLink)
      },
      (error: any) => {
        console.error("Firebase DL ERROR", error)
      }
    );

Click on a Firebase dynamic link from outside the application and be redirected to the application. Nothing happens... Remove cordova-plugin-ionic from the android platform Listen for Firebase dynamic links again, it works !

Expected behavior

Firebase dynamic links should handle links when clicked from outside the application and process the link path within the firebaseDynamicLinks.onDynamicLink subscription

kingbenjames commented 4 years ago

please i need help with how exactly to make the referrer link appear on my screen i create the firebasedynamic link i have download the plugins i don't how to get it to show on my referrer page on my ionic app

0luwaj0x1 commented 4 years ago

@Lordonnance do you have the links clicked for outside register in the firebase console ?