Search code examples
react-nativedeep-linking

Linking.openUrl to open Add New Contact Page directly in React Native


I want to open Add New Contact page directly of my phone's app using Linking.openUrl in React Native. I Googled it but not found any solution. If someone know how to do this please help me. Thanks in advance.


Solution

  • You cannot open new Contacts Page directly from Linking.openUrl but you can achieve this by installing a library called as react-native-contacts

    Official Docs: https://www.npmjs.com/package/react-native-contacts

    Eg:

    import Contacts from 'react-native-contacts';
    
    export default function App() {
      return (
        <View style={styles.container}>
          <TouchableOpacity 
            onPress={() => {
               Contacts.openContactForm()
            }}
          >
          <Text>Create Contact</Text>
          </TouchableOpacity>
        </View>
      );
    }