How can I trap clicks on location for calendar events
I would like to create an app which interfaces with calendar events such that I could redirect taps on the location link for a calendar event and point them to my app for more information. Could anybody point me in the right directio开发者_如何转开发n for the necessary api calls and or issues I'll need to deal with. Ideally, one would tap the location link and be presented with a choice of using google maps or my app to present the location information instead of just automatically being directed to maps.
Step #1: Figure out what Intent
is used for the event you want (e.g., is it ACTION_VIEW
with a geo:
Uri
?)
Step #2: Set up your Activity
with an <intent-filter>
that will respond to that Intent
.
Bear in mind, though, that it is very unlikely that you will only be able to handle requests from a calendar app. More likely, anything on the device that launches a map will cause your app to be an option.
精彩评论