Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open an external app from react native app?

Tags:

Is it possible to open an external app when touching a button from my react native app? Specifically, i want to open Whatsapp when I touch a button. How can I do this?

Thanks!

like image 780
hecontreraso Avatar asked Mar 01 '17 15:03

hecontreraso


People also ask

How do I open an external app in React Native?

For Android you can use Android Studio > Build > Analyze APK to view an APK's AndroidManifest. XML file to see the list of Intents.

How do I open a site in React Native?

Try this: import React, { useCallback } from "react"; import { Linking } from "react-native"; OpenWEB = () => { Linking. openURL(url); }; const App = () => { return <View onPress={() => OpenWeb}>OPEN YOUR WEB</View>; }; Hope this will solve your problem.

Can we convert React Native app to web app?

Can React Native be used for web and mobile? Yes! With React Native for Web, developers can write a single React Native application that can run natively on Android and iOS, as well as on a web browser using standard web technologies.


1 Answers

You have to use React Native Linking API:

Linking.openURL('whatsapp://app') 

Also, have a look at How can I integrate WhatsApp into my app

like image 90
Ihor Burlachenko Avatar answered Sep 19 '22 08:09

Ihor Burlachenko