How to Navigate Mobile app if installed on your Phone from Browser

Viewed 480

I have Two scenario navigate to my react native Apps

I created web apps using react js

1.If mobile App not installed, In Mobile Browser i entered an URL like "https://mywebpage.com" it will redirect to google play store.

  1. If App is installed,In Mobile Browser i entered an URL Like "https://mywebpage.com" it will navigate to open my app.

How to Solve this navigation ? Any ideas

Thanks, Vasanth

1 Answers

thats not possible. if user manually enters web address in browser then browser will open this url. optionally there might be some button in browser suggesting that there is a native app installed and user may switch to it, but this isn't default behavior and mentioned button is a bit hidden (in Firefox at least)

all you can do is to implement App Links. this won't prevent opening web page when url is entered manually in address-/omnibar, but when you click a link to your site placed in some app, e.g. sent in SMS, mail or some communicator then Android will open your app (or may pass to Store, or open web page in browser, thats configurable)

without android:autoVerify="true" (or when auto-verification failed) system ask in which app you want to open this url: web browser or native app. this is called Deep linking. user may pick one app and choose "only once" or "always". you don't have option to check that your app is picked as default handler for such urls (when user pick web browser and press "always" then all your page links will still be opened in it)

Related