question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android 11 / SDK 30 support

See original GitHub issue

It 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:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
tschoffelencommented, May 27, 2021
1reaction
tschoffelencommented, Apr 15, 2021

Ah amazing! Was trying to figure out something similar for a related library, but wasn’t able to test it myself yet.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found