I'm using REST API provided by firebase for dynamic link generation. How do I create a link that opens up app and include app specific variables.
It's the same value. If the app is not installed, link will be opened in the browser (unless overridden by the ifl or afl params). If the app IS installed, it will launch and you'll get the contents of link delivered to you, which you must then parse out and handle as necessary to accomplish deep linking to content inside the app.
See here for an implemented example, and a comparison with the simpler 'key:value' approach we use at Branch.io (full disclosure: I'm on the Branch team).
Related
What I am trying to do is opening a deep link in mobile browse (Not in app). Deeplinking is all set up, all the links with specific domains are opening/navigating into app opened from any where else. Now here is a scenario that there are some particular links with same domain (I set up deeplinking for), I want to open that in browser because I don't have any view to show for that link in my app so I want them open in browser.
I have identified the links but when I opened these links via Linking.openUrl it navigates me to the app.
if (lowerUrl.includes(PostType.NO_DEEP_LINK)) {
Linking.openURL(lowerUrl);
return null;
}
Is there any method I can specify the Linking method to open url in mobile browser not in app although the url has a same domain that is setup for deep linkg.
Solution 1#
The best possible solution for that can be using android:pathPattern in android manifest. Basically you have to provide path pattern (a sort regex) to match the valid links.
Documentation for that can be found here.
https://developer.android.com/guide/topics/manifest/data-element
Solution # 2
One has to make RN Native Module and instead Linking.openURL(lowerUrl) to handle this kind of scenario.
To make browser native module one can take help from here.
This solution doesn't work with devices which lacks google play services like Kindle Fire, etc
I have the following requirement and based on the branch docs I cannot get myself a straight answer.
We want to enable deep links that if the user has the app installed that it uses them and if not redirects to download then redirects.
If the user is on a desktop they get redirected to a page to download app.
We want to control all the actual deep linking using react navigation config and wanted to know how we can pair the two!? The guides are very poorly written and makes understanding the flow a nightmare.
Some guidance and suggestions on how best to accomplish this would be great.
P.s. are the links generated that when app found it takes the prefix and replaces with appname:// ??
Your requirement for deep linking can be handled with Branch, you can set the URI schemes of the apps under the link settings of your Branch dashboard and also mention your app on PlayStore/Appstore for the user to download the app when clicked on the link.Similarly you can add the redirection URLs for the scenarios when your link is clicked on a desktop.
Alternatively you can use our React SDK to create links with all these link properties and even more. More details here.
The handling of the deep link data and redirecting the user to the desired page can be found here.
If you wish to know more about how Branch passes data through to the app and attributes app sessions, check this.
My custom domain https://mysub.mydomain.com is registered to Firebase Hosting correctly and I can create dynamic link with using my custom domain.But 3 warning occurs and IOS dynamic link is not open my IOS App.
If I use google default domain "xxx.page.link" , everything is ok.
The dynamic link has 3 warning(s)
We could not find Android package name 'xxxxx' in your Google project. Learn more.
We could not find bundle ID 'xxxxxxx' in your Google project. Learn more.
There is no configuration to prevent phishing on this domain https://mysub.mydomain.com/example. Setup URL patterns to whitelist in the Firebase Dynamic Links console. Learn more.
Issues about package and bundle should be fixed in firebase console project settings. You need to check that your iOS and android apps listed here have package name and bundle Id.
Last issue warns you about whitelisting your domains so that nobody could create dynamic links for you app passing links to random domains.
To handle it you need to tap on three dots near the add dynamic link button in firebase console and add all you domains (regex accepted) that can be used in your dynamic links.
I am currently developing a mobile app with react-native and this app contain a invitation code.
Store download link will have a invitation code parameter.
I want to get this parameter from downloaded apps via store download link.
How can i do this on react-native ?
Thanks in advance
Use Firebase Dynamic Links
Firebase Invites makes it simple for users to send content to their friends, over both SMS and email, by ensuring that referral codes, recipe entries, or other shared content gets passed along with the invitation—no cutting-and-pasting required.
Documentation https://firebase.google.com/docs/dynamic-links/
How does it work?
You create a Dynamic Link either by using the Firebase console, using a REST API, iOS or Android Builder API, or by forming a URL by adding Dynamic Link parameters to a domain specific to your app. These parameters specify the links you want to open, depending on the user's platform and whether your app is installed.
When a user opens one of your Dynamic Links, if your app isn't yet installed, the user is sent to the Play Store / App Store to install your app (unless you specify otherwise), and your app will open. You can then retrieve the link that was passed to your app and handle the deep link as appropriate for your app.
For react-native use react-native-firebase https://www.npmjs.com/package/react-native-firebase
and
https://rnfirebase.io/docs/v5.x.x/links/reference/links
How to launch a specific page of hybrid worklight application on clicking a link in email?
I did not go through all the steps involved, but yes, you can do this.
Step 1
Create a Worklight application using, for example, jQuery Mobile to handle the multiple pages
Step 2
If the app is intended for Android, you will need to modify the AndroidManifest.xml file with an intent filter in order to associate the app with an action and a custom URL scheme
You can read more about this by googling for "opening android application using a custom URL scheme", for example
If the app is intended for iOS, you will need to modify the <app-name->info.plist file with a custom URL scheme
You can probably follow this guide: http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html
Step 3
Once you get the app to open from an external link, you need to handle the parameters. You'll want this since you want to open a specific page. This is also mentioned for iOS in the above link, and you'll need to further google this for Android
Step 4
Once you've obtained the parameter, you can use the Send Action to JavaScript from Native API for iOS and Andriod in Worklight in order to pass a command to JavaScript, telling the web code to do some changePage function that will load the specific page