can't open maps
Could not open the url: https://www.google.com/maps/dir/?api=1&travelmode=driving&dir_action=navigate&destination=-6.4155281732857%2C106.80307019501998
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
Try adding this line in your manifest:
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
Try adding this line in your manifest:
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
It worked!