Reputation: 1036
I tried with the npm module react-native-check-app-install
but I couldn't achieved always the result is false.
Also tried with react-native-installed-apps
to get the list of apps installed in the phone but this return always empty list.
Upvotes: 5
Views: 6311
Reputation: 1017
Did you make sure to declare the URL schemes?
Once you've done that, you don't need an additional package to check if you can open Google Maps. You can just use the Linking module.
Linking.canOpenURL('comgooglemaps://?center=40.765819,-73.975866')
.then((canOpen) => {
if (canOpen) { console.log('open google maps'); } else { console.log('open apple maps'); }
});
Upvotes: 11