Android 11 / SDK 30 support
See original GitHub issueIt took me a while to figure this out, but when switching to Android 11/Android SDK 30 (i.e. using Expo SDK 41), this library doesn’t work out of the box anymore. The reason is the new Package Visibilty security feature. We’ll have to update our AndroidManifest.xml
to explicitly allow querying for other apps.
I’m posting my changes here as it might help others running into the same problem. It would also be great to get some feedback as I’m not able to test all these apps myself. Eventually, once we have confirmed this works as expected, this should probably go in the react-native-map-link
documentation.
<manifest package="com.example.app">
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="http"/>
</intent>
<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>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="applemaps" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="citymapper" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="uber" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="lyft" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="transit" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="truckmap" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="waze" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="yandexnavi" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="moovit" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="yandexmaps://maps.yandex." />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="yandextaxi" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="kakaomap" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="mapycz" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="mapsme" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="osmand.geo" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="gett" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="nmap" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="dgis" />
</intent>
</queries>
...
</manifest>
So far I could verify the following apps: google-maps
, citymapper
, uber
, lyft
, waze
, maps-me
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Set up the Android 11 SDK
Click Tools > SDK Manager. In the SDK Platforms tab, select Android 11. In the SDK Tools tab, select Android SDK Build-Tools 30...
Read more >API Levels | Android versions, SDK/API levels, version codes ...
Version SDK / API level Version code Codename Cumulative usage Year
Android 13 Level 33 TIRAMISU Tiramisu 2.0% 2022
Android 12 Level 32 Android 12L...
Read more >Use of All files access (MANAGE_EXTERNAL_STORAGE ...
This is only applicable to apps that target Android 11 (API level 30) and declare the MANAGE_EXTERNAL_STORAGE permission, which is added in Android...
Read more >Android Platform Guide - Apache Cordova
Android API Level Support ; 11.X.X, 22 - 32, 5.1 - 12.0.0 (L) ; 10.X.X, 22 - 30, 5.1 - 11.0.0 ; 9.X.X,...
Read more >Will Android 11 (SDK 30+) support ever be implemented ...
I've spent the last few days scouring the indexable internet searching for answer's as to why save games won't work on Android 11....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Good point, I’ve added some details:
https://github.com/flexible-agency/react-native-map-link/commit/6faf0f4b08f031e1dad7efd4f5d7a81e478f3c31
Thanks!
Ah amazing! Was trying to figure out something similar for a related library, but wasn’t able to test it myself yet.