Create Waze links in web page - waze

I want to build links in my web page to open in Waze.
I have a DB with my customers addresses (not the GPS or Lat/Long) and want to click on the link and open Waze with the directions to the address.

This should be relatively easy to do with the Waze Deeplinks feature. The deep links work differently depending on which environment you're on (see below), which should be fine in your use case.
Basically, when you link someone to https://waze.com/ul?q=some%20address, the Waze site will then take the appropriate action:
Desktop: shows a page that allows you to send the location to a mobile device
Mobile (with Waze installed): open the app and start the search with the entered arguments
Mobile (without Waze installed): open as the live map with a link to the the Play Store or App Store to install Waze
There's the argument &navigate=yes you could add to the URL to start the navigation directly. But from my experience that only seems to have an effect if you provide exact coordinates to navigate to, which you mention you don't have.

Related

How do I open the deep link in mobile browser rather than mobile app in react native

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

React Native send email with link to web app or mobile app

I am trying to implement deep linking into this app. The app is a React Native Expo app, and is served on web, iOS and Android. There are a bunch of things we want to achieve with this i.e. link to specific things in the app such as certain messages etc. But currently my primary focus is just to navigate to general screens like 'Home', 'Messages', 'Login' etc.
I have been testing and so far, I can enter the URIs such as exp://host:port/--/login and they work as expected.
However, I know and understand that this will not work in a web browser on my laptop for example.
So my question is, how do I send an email to a user let's say after they have verified their account, prompting them to login, with a link that will for one, take them to the web app if they are on desktop, and two open the mobile app if they have it installed on their phone?
And just as an example, let's imagine my deep link URI is myapp://login
Thanks for any help.
EDIT
After looking around some more, I am deciding to consider the possibility of linking to the web app, and upon the web app loading, linking to the mobile app if they have it installed.
Given this, what is the best way to handle this?
You can follow one of the next approaches.
Validate the request origin and based on that generate the link for
an specific platform.
Generate as much links as platform are currently serving you app.
Like: Link to iOS, Link to Android and Link To web
You can design image buttons for each one to make it prettier

Expo shared link is not clickable

I've been trying to create mechanism for my Expo app, that will allow users to share content of app (so I basically need linking with params, and I think I know how to do it, according to docs).
I wanted to start creating this mechanism with simple sharing, without params (just clickable link that opens app). Here's my code (executed when user presses share button):
share = async () => {
await Share.share({
message: Linking.makeUrl()
})
}
It shares link as excepted (I tried it on messenger), but shared link is not clickable. I also tried using exp://192.168.100.3:190000 that points to my PC in the same LAN (I coped that from http://localhost:19002/), where metro bundler is running, and copying Tunnel link - neither of those worked, link is just a plain text, and if user clicks on it nothing happens. But, when I scan QR code, from http://localhost:19002/ (metro bundler page) application opens as excepted.
You're doing everything just fine!
The reason why a shared link is not clickable in some apps is simply because of the mechanisms of the other apps for "detecting" links from plain text and "linkifying" them.
You see, these links are actually "deep links" (custom URL schemes).
Here's an example. If I share this link: exp://192.168.100.3:190000 over Slack, it becomes "clickable", because it looks like Slack has a mechanism to detect these custom "deep links" which lead to a mobile app:
If I share the same link over Messanger, it outputs it as a plain text. This is because Messanger doesn't have a mechanism to detect these "deep links".
In order for the link to "click", it must be rendered in an anchor tag. Messenger simply linkifies only "known" web links (http://, https://...), not custom ones.
The QR code reader in your case opens your deep link, because it has a mechanism to detect "deep links".
So, if you want a reliable way for making your links always "clickable", here's the workaround: spin-off a web site. When people generate (and share) links, they share web links https://your-server. When they open these links -> the web server redirects them with the exp://... (or your custom) scheme. If users have your app installed - the links will open with your app.

Branch.io architecture query

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.

How can i get parameters from play store download link

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