STBox
STBox

Reputation: 645

React-Native: Open mobile app from website

Can that be possible? I have a web app and a mobile app as well. The user goes to website and there is a button "Download App for Mobile". When the user clicks on the button, if the app is already installed, the app should be opened otherwise the user must be redirected to the respective store with the link to download the app from store. Any help in the form of Articles, Videos or suggestions would be highly appreciated.

Upvotes: 1

Views: 2103

Answers (2)

Yoel
Yoel

Reputation: 7965

read about getInstalledRelatedApps()

see here for more information

https://web.dev/get-installed-related-apps/

chromeStatusNewFeature

Upvotes: 0

awan_u
awan_u

Reputation: 21

To do this you would have to use sockets and make a background service on your mobile app that listens to an event. When you click on the button an event should be fired from the browser which when listened by the background service, brings the app to foreground. And it will require your web app and react-native to have a socket connection. If no connection is established then you can redirect the respective store. To create socket connection you would need to use a server for communication between mobile app and web app.

Upvotes: 0

Related Questions