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!
For Android you can use Android Studio > Build > Analyze APK to view an APK's AndroidManifest. XML file to see the list of Intents.
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 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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With