I have program with maps. When user click url link containing ‘mymaps.com’ – my program shows in chooser dialog as alternative of web browser.
I want to do same when user click link to google maps /web or application generated/.
I have found different url formats:
- http://m.google.com/u/m/zIOcsV
- http://maps.google.com/maps?q=45.089036,+-106.347656&num=1&t=h&vpsrc=0&ie=UTF8&z=4&iwloc=A
I suppouse there are other formats too.
Does anybody know how to intercept all formats?
Use an intent filter! See here for more info : http://developer.android.com/guide/topics/intents/intents-filters.html
In your android manifest, add the following in your tag for the activity you want to open :
Then in your Activity
create a method called : handleIntent like so
in your onCreate you will need to call handleIntent like so
(optional) You may need to override the onNewIntent like so (just in case your AndroidManifest activity configchanges property is tweaked)