Auto start navigation with React Native Google Maps Directions package

    import getDirections from "react-native-google-maps-directions";
    ...

    handleGetDirections = () => {
        const data = {
            source: {
                latitude: originLatitude,
                longitude: originLongitude
            },
            destination: {
                latitude: destinaationLatitude,
                longitude: destinationLatitude
            },
            params: [
                {
                    key: "travelmode",
                    value: "driving"  // may be "walking", "bicycling" or "transit" as well
                },
                {
                    key: "dir_action",
                    value: "navigate" // this instantly initializes navigation using the given travel mode
                }
            ]
        }
        getDirections(data)
    }

Source: https://www.npmjs.com/package/react-native-google-maps-directions#install


100% work

If you want to auto-start navigation from your current location to specific location https://developers.google.com/maps/documentation/urls/android-intents#launch_turn-by-turn_navigation

Sample Code

static googleMapOpenUrl = ({ latitude, longitude }) => {
    const latLng = `${latitude},${longitude}`;
    return `google.navigation:q=${latLng}`;
  }

To open google map on click React-Native will do like this

Linking.openURL(googleMapOpenUrl({ latitude: 23.235899, longitude: 78.323258 }));

The react-native-maps-directions uses the Directions API to display routes. Please note that Directions API doesn't include any real-time navigation, it is meant only to show routes. The real-time navigation additionally is prohibited in the Google Maps APIs.

Have a look at the Google Maps API Terms of Service paragraph 10.4 (c, iii). It reads

No navigation. You will not use the Service or Content for or in connection with (a) real-time navigation or route guidance; or (b) automatic or autonomous vehicle control.

source: https://developers.google.com/maps/terms#10-license-restrictions

In order to be compliant with Google Maps API Terms of Service you should open the Google Maps app installed in your device using the Google Maps URLs in navigation mode.

var url = "https://www.google.com/maps/dir/?api=1&travelmode=driving&dir_action=navigate&destination=Los+Angeles";
Linking.canOpenURL(url).then(supported => {
    if (!supported) {
        console.log('Can\'t handle url: ' + url);
    } else {
        return Linking.openURL(url);
    }
}).catch(err => console.error('An error occurred', err)); 

I hope this helps!