When I click a button it should navigate to google maps app in iPhone or Android phone and if the app is not present it should open in the browser. How can we approach this. Please help me. Thanks in Advance.
Use Cordova plugin http://ngcordova.com/docs/plugins/appAvailability/ to determinate if google maps apps exist.
If google maps don’t exist use this plugin to open google maps in browser view: http://ngcordova.com/docs/plugins/inAppBrowser/
If app do exist use this plugin to open it: https://github.com/lampaa/com.lampa.startapp
Thank you for the answer. I have another query. Can I transfer data to another app. Suppose I have an address in my App and I have to take the address to maps app and I have to place it in TO address of maps app. Can I achieve this??
Could you please describe last part once again?
You can transfer data to another app but I didn’t understand from what point to what point.
Use this one
Yeah Sure. I am saying that for example we are using google maps API. We navigated from our app to google maps App. While navigating can we transfer any data?? My requirement is that I have location co-ordinates. I have to put this location co-ordinates in google maps app. Please post if you have any queries about this topic. Thank you.
Dude you have 2 choices:
- Launch native navigator app:
https://github.com/dpa99c/phonegap-launch-navigator - Display native google maps in-app:
https://github.com/wf9a5m75/phonegap-googlemaps-plugin
You have example for Ionic app down there
Yes you can, in fact, it’s not that hard, you only need to use standard Cordova InAppBrowsers. Before you say anything, this plugin can also open external applications.
I wrote an article on this topic: http://www.gajotres.net/how-to-launch-external-application-with-ionic-framework/
In this article, I’m using Twitter but principle is the same.
No point in using 2 different plugins when he can do that with InAppBrowser plugin.
No need 2 plugins. Only 1 - cordova launch navigator.
It’s perfect plugin, opens directly navigator.
what do I import in my ionic2 page to use this plugin?