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
Related
hello everyone i am working on a react native application i want to know how can i get the whatsapp location data into my app like if someone send me location on whatsapp when i'll click on that location it will show me open with list of application how can i add my application into that list you can see the below ref image
enter image description here
I've added the location permission to my application already but still not showing
i want to get the map lang and lat data into my application so i can store that
For Android you can use intent filter for location https://developer.android.com/guide/components/intents-common#Maps
<activity ...>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="geo" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
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?
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!
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.
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" />