tschoffelen / react-native-map-link

🗺 Open the map app of the user's choice.
MIT License
640 stars 137 forks source link

appsWhiteList not working on android #171

Closed nikoloz110 closed 3 years ago

nikoloz110 commented 3 years ago

I have it set like this

showLocation({
      latitude: Number(latLng[0]),
      longitude: Number(latLng[1]),
      alwaysIncludeGoogle: true,
      appsWhiteList: ["google-maps", "apple-maps"],
    });

but I am still seeing 'Bolt' & 'Yandex" suggestions 161796626_202205154990364_1782361589637028958_n while opening the map android 10

tschoffelen commented 3 years ago

Hey, this is actually related to #138.

The library correctly detects that only one option is available based on the whitelist you've set ('google-maps'), so it immediately opens that app. Unfortunately, Bolt and Yandex Go both 'hijack' Google Maps by telling Android that they're able to open maps.google.com, which is why the system native app chooser is then shown.

There's unfortunately not too much we can do about that, except for switching to Android Intents.