Open react native app from email link for reset password implementation - react-native

I have implemented a react native app with deep linking implementation. I have successfully open my app using
adb shell am start -W -a android.intent.action.VIEW -d sports://sport
this command open app in simulator, So deep linking concept working fine.
But how to open the app in mobile while clicking on email link.
Is anyone know how link is build for sending in email and once i click on email link from mobile my app open?
I have also installed "Deep link Tester" app from google app store and running same link on it which will opening my app successfully.
Code for Android setup
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="sports" android:host="sport" />
</intent-filter>
I have added intent-filter in activity tag of AndroidManifest.xml file.
What I want to achieve:
When user press forgot password from mobile app, I will send email with token for reset there password. So when user click on email link I want to open my app and redirect him to reset password route
What is problem:
I am not able to open react-native app from mail

I am able to achieve deep linking in react native with help of Branch.io provide solution for deep linking for mobile app
Solution
I follow step given in below link of branch.io
React native implementation for deep linking with branch.io
With this step now i am able to open my app from emails with route implementation for open different pages in my app.

Related

How to create react native firebase dynamic links?

I am working on react native app. My app is having login and signup page. After signup I am sending an email to user to verify account. User will get a link to verify account, after clicking on that link I am redirecting user to url where I am verifying him. Now I want to redirect the user inside "my app" verification screen if he is verifying using mobile phone.
Is this possible with Firebase Dynamic Links??
I have created firebase project and integrated with my android app. After this I have created dynamic link for my app using firebase console:: "https://myapp.page.link"
Now I am having this section on firebase console::
After this I clicked on "New Dynamic Link", but able to add deep link and next settings. What should be the deep link for my case and where it used??
Inside AndroidManifest.xml file I have added this intent activity::
<activity
android:name=".MainActivity"
android:launchMode="singleTask"
android:label="#string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize">
and intent-filter as follows::
<intent-filter android:label="filter_react_native">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="https"
android:host="myapp.page.link" />
</intent-filter>
After this I have open this url in chrome(in my mobile):: "http://myapp.page.link", but it shows Invalid dynamic link because I have not completed deep link section. You can check the screenshot::
Please tell me what will be deep link for my case and where it used??
What are the other required changes I have do inside AndroidManifest.xml?
What react native code I need to add to redirect user inside specified screen on opening this url?

Defining default link handling behaviour in app

My users open a link of my app in Whatsapp/Slack and it opens in a webview inside Whatsapp/Slack. How can I get it to open in my app and not in Whatsapp?
If there is a link I should read up, please post. I did search and then have asked.
As suggested in React Navigation documentation :
InYourAppName/android/app/src/main/AndroidManifest.xml, do these followings adjustments:
1.Set launchMode of MainActivity to singleTask in order to receive intent on existing MainActivity.
2.Add the new intent-filter inside the MainActivity entry with a VIEW type action.
Now, your manifest file should be like below :
<activity
android:name=".MainActivity"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="mychat" />
</intent-filter>
</activity>
Since you mentioned opening of your react native app, when clicking on a link, I assume that you are talking about deeplinking your content on the app.
In iOS there are two ways of achieving this, and there must be similar approaches for android as well.
The first method is by defining custom url for your app. By registering a custom url scheme for your app, any url that starts with your-custom-url:// will be automatically redirected to your iOS app.
To register a custom url scheme, follow these steps:
Open Xcode and click on your project, on the left pane.
Select your target (your app), and navigate to the Info tab.
Scroll down to the URL Types section and click plus to add a new one.
In identifier field enter your app bundle identifier (ex: com.your.app.name)
Keep the role as editor and in the URL schemes add the custom url prefix for your app. (ex: myawesomapp).
These steps will register your custom url scheme.
The second way of handling deeplinking in the app, is by using UNIVERSAL LINKS.
This is the apple's suggested way of handling deeplinking. According to apple,
Adding support for universal links is easy. There are three steps you need to take:
Create an apple-app-site-association file that contains JSON data about the URLs that your app can handle.
Upload the apple-app-site-association file to your HTTPS web server. You can place the file at the root of your server or in the .well-known subdirectory.
Prepare your app to handle universal links.
Now any link to your website such as www.example.com/user/username, will be redirected to your app that you got registered.
You can refer docs

Firebase dynamic link fails to launch iOS app during password-less auth

Firebase is sending the password-less auth email correctly from my app via a 'Sign up' button, the 'magic link' in the email is taking me to my dynamic link domain, but I'm getting stuck at that point and the app is not being opened.
I've got an Ionic 3 application built for iOS using Firebase for the back end. I'm trying to implement Firebase password-less auth and followed this tutorial:
https://medium.com/#vivek040997/how-to-implement-firebase-email-link-passwordless-login-in-ionic-4-for-android-4c61f331c4a0
I've added my iOS app to Firebase, and in project settings, added the bundle ID, 10 char. app ID and 10 char. development team ID. The app has been created on App Store Connect, although it's not live in the App Store yet.
I've placed the GoogleService-Info.plist file into the root of my Ionic 3 project.
I've enabled email/password and password-less auth in Firebase.
As per the tutorial, I created a new index.html page (configured as a single page app using Firebase tools with some simple "logging in..." text) and ran '$firebase init hosting' and '$firebase deploy'.
I enabled Firebase dynamic links through my Firebase console, sticking with the simple 'my-app.page.link' domain.
I installed the Firebase dynamic links plugin for Cordova by using:
$ cordova plugin add cordova-plugin-firebase-dynamiclinks -- variable APP_DOMAIN="my-project.web.app" --variable PAGE_LINK_DOMAIN="my-app.page.link"
I was sure to use the correct project app domain (from hosting) and page.link domain. My package.json includes:
"cordova-plugin-firebase-dynamiclinks": {
"APP_DOMAIN": "my-app.web.app",
"PAGE_LINK_DOMAIN": "my-app.page.link"
My config.xml file includes the correct values, eg.:
<platform name="ios">
<preference name="GoogleIOSClientId" value="my-value" />
</platform>
<platform name="android">
<preference name="GoogleAndroidClientId" value="my-value" />
</platform>
I also installed the Ionic native plugin:
$npm install #ionic-native/firebase-dynamic-links
The plugins seem to be working correctly as I built a simple page to capture an email address and send the 'magic link' email. That works. I'm receiving the email correctly.
When I click on the magic link on my iOS device (opens in Safari), I see a 'preview.page.link' page with my app name, a little checkbox saying "Save my place in the app. A link will be copied to continue to this page." and an 'Open' button.
Clicking that button takes me to my Firebase hosted index.html page with the "logging in..." text I added, but hangs there. The app does not open so I just stay in Safari on that page.
I'm stuck now :(
No idea how to debug this further.
Any ideas how to get the redirect to open the iOS app correctly? Thanks in advance!

Branch.io : how to remove deeplinking on Quick Links?

I want to create Quick Links in Branch.io that redirect for example :
- either to my iOS list of app if the user is on iOS
- or to my Android list of app if the user is on Android
So I created a Quick Link in Branch.io.
In the "REDIRECTS" tab, I pasted my iOS url and Android url to my list of apps in the appropriate fields, and changes the type of these fiels to 'Web URL'.
My problem if that if the user has got my app on its device, it will open my app and not my catalog. It is because it is written on the 'REDIRECTS' page: 'If the app isn't installed, send users to: ...'
In my case, I want to send the users to my catalog even if the app is installed.
How to solve this problem ?
If you want to open the web instead of the app, please check out the web_only feature: https://docs.branch.io/pages/links/integrate/#open-web-instead-of-app

How to open a url in sencha touch panel?

I developed a twitter mobile web app using Sench Touch 2. In my iPhone, I open it and add it to homescreen. When I click a link from the app, it will jump out of the app and open the url using Safari. When I return to my app, it needs to reload itself again. So, I wanna know is there a way to open a link in my own app using another panel view?
If you build your app with phonegap, there is an entry in 'config.xml':
<!-- ios: external links should open in the default browser, -->
<!-- 'true' would use the webview the app lives in -->
<preference name="stay-in-webview" value="false" />