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?
3 Answers
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).

- 986,068
- 189
- 2,389
- 2,491
-
Thanks, that makes it very easy. – Friedrich Feb 05 '12 at 13:07
-
Hmm, I thought the question was about Android AND iOS? Anyway on iOS, opening a google maps URL from a website will launch the maps app automatically, so it sounds like the same approach will work for both platforms. – Nick Lockwood Feb 05 '12 at 13:21
-
@NickLockwood: My apologies for helping where I could on a three-hour-old question. – CommonsWare Feb 05 '12 at 13:34
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.

- 1
- 1

- 40,865
- 11
- 112
- 103
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.

- 27,355
- 15
- 87
- 125