Reputation: 645
I am looking for a way to post a Android "Intent" from a website. In the particular case, I want to open the native Google Maps Directions. Is there a portable way to archive the same behavious with iOS?
Upvotes: 0
Views: 323
Reputation: 40995
On iOS this is a bit different because you only have apps, not intents like Android. You can launch apps using custom schemes, then it would be up to the app to show a particular view controller.
If you want to launch the standard iOS maps app from a URL on IOS, you can just use a regular google maps URL and iOS will open that in the maps app instead of a browser (see here for details).
If you want to launch your own app with a maps view displayed, you need to define a custom URL schema (something like myapp://showmaps, see here for details) and when you open a URL like that on an iPhone that has your app installed, it will launch the app and pass through the showmaps path so that app can display the correct screen.
Upvotes: 1
Reputation: 1006674
I cannot speak for iOS. However, on Android, if the user clicks on a Google Maps URL, they will have the choice of opening the map in a browser or in the native Google Maps application. With respect to directions, if you have the proper Google Maps URL with the driving directions encoded, it will open up in the Directions portion of the Google Maps app (again, if the user chooses).
Upvotes: 1
Reputation: 27455
Check the Cloud to Device Message Service for Android. You can use it to send short notifications to a certain Android Device. In your app you can listen for them an react accordingly.
Here you find a tutorial for C2DM.
For iOS there is a similar service. Search for iOS and push notification.
Upvotes: 0