[Firebase Cloud Message Plugin] Deep linking in Firebase plugin

Forge Component
(6)
Published on 18 Jul by Experts
6 votes
Published on 18 Jul by Experts

There has been a few questions regarding deep linking in firebase plugin in the forum but no answers yet. Does anyone know if this plugin supports deeplink and how do we go about it?

Solution

Stephen Yeo wrote:

There has been a few questions regarding deep linking in firebase plugin in the forum but no answers yet. Does anyone know if this plugin supports deeplink and how do we go about it?

Hello Stephen, how are you?


The Firebase plugin does support deep linking. Here's an example

I have a Mobile Application that have a Screen called Deep Linking that have a mandatory Input Parameter

As you can see the screen is called DeepLinkScreen and the Parameter name is Message (its type is Text)

Here's the Server Action where I send the Push notification (ignore the HasDeepLink parameter, it's just a boolean I use within an If). The Deeplink parameter is of the type Deeplink and it includes a list of DeeplinkParam. Each DeeplinkParam contains two parameters: Name and Value, Name being the name of a parameter in the target deeplink and Value being the value of said parameter.

Inside my server action I set the values of the target ScreenName (the same as in the mobile app) and the DeeplinkParam (with the name of the parameter in the mobile App and the value I want), and after setting I add it to the DeeplinkParams list


Finally when I call Firebase's own Server Action SendNotificationToUser (or any equivalent action for notification sending), I pass my Deeplink variable as a parameter

Hope this helps, let me know if you need any other information.

Solution

Hello,


A great addon to the plugin would be Firebase Dynamic Link (a powerfull version of Deeplinking by Firebase).


Reference: https://firebase.google.com/docs/dynamic-links/


Regards

Thanks Jay for the response! 

Stephen Yeo wrote:

Thanks Jay for the response! 


Glad I could help! Let us know if you have any other questions :)

Jay Santos wrote:

Stephen Yeo wrote:

There has been a few questions regarding deep linking in firebase plugin in the forum but no answers yet. Does anyone know if this plugin supports deeplink and how do we go about it?

Hello Stephen, how are you?


The Firebase plugin does support deep linking. Here's an example

I have a Mobile Application that have a Screen called Deep Linking that have a mandatory Input Parameter

As you can see the screen is called DeepLinkScreen and the Parameter name is Message (its type is Text)

Here's the Server Action where I send the Push notification (ignore the HasDeepLink parameter, it's just a boolean I use within an If). The Deeplink parameter is of the type Deeplink and it includes a list of DeeplinkParam. Each DeeplinkParam contains two parameters: Name and Value, Name being the name of a parameter in the target deeplink and Value being the value of said parameter.

Inside my server action I set the values of the target ScreenName (the same as in the mobile app) and the DeeplinkParam (with the name of the parameter in the mobile App and the value I want), and after setting I add it to the DeeplinkParams list


Finally when I call Firebase's own Server Action SendNotificationToUser (or any equivalent action for notification sending), I pass my Deeplink variable as a parameter

Hope this helps, let me know if you need any other information.


Hello Jay, did you try deep links when you close the app (pressing back button in mobile)?

If I close the app in this way, the link never go to the specific screen and always stay in home. But if I close the app via recent apps (in my phone) the link works properly (first load the app and later redirect me without problems).

I've been investigating and I haven't find nothing. Has anyone this problem?