react-native-google-maps-directions icon indicating copy to clipboard operation
react-native-google-maps-directions copied to clipboard

can't open maps

Open icon0SS opened this issue 4 years ago • 3 comments

Could not open the url: https://www.google.com/maps/dir/?api=1&travelmode=driving&dir_action=navigate&destination=-6.4155281732857%2C106.80307019501998

icon0SS avatar Aug 13 '21 00:08 icon0SS

Could not open the url: https://www.google.com/maps/dir/?api=1&travelmode=driving&dir_action=navigate&destination=-6.4155281732857%2C106.80307019501998

if you are using android and the compileSdkVersion = 30 and targetSdkVersion = 30:

  • add to your AndroidManifest.xml:
<queries>
        <intent>
            <action android:name="android.intent.action.VIEW" />
            <data android:scheme="https"/>
        </intent>
        <intent>
            <action android:name="android.intent.action.VIEW" />
            <data android:scheme="geo" />
        </intent>
        <intent>
            <action android:name="android.intent.action.VIEW" />
            <data android:scheme="google.navigation" />
        </intent>
</queries>
  • change in your build.gralde: dependencies { classpath("com.android.tools.build:gradle:3.5.4") ... }

References: https://stackoverflow.com/questions/64699801/linking-canopenurl-returning-false-when-targeting-android-30-sdk-on-react-native

marchiartur avatar Sep 17 '21 19:09 marchiartur

Try adding this line in your manifest:

<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />

muhalovic avatar Sep 27 '21 11:09 muhalovic

Try adding this line in your manifest:

<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />

It worked!

bsor-dev avatar Jan 04 '22 12:01 bsor-dev