Join David Gassner for an in-depth discussion in this video Passing the current location to another mapping app, part of Building Mobile Apps with Google Maps Android API v2.
- View Offline
In my tour-finding app, I'm now able to display a list of available tours,…and the user can select a tour and see the details including a live interactive map.…I'd love for my application to do a lot…more, but let's imagine that I have limited resources, and…I'd recognize that there are other apps that are on…the user's device that do a lot for them already.…Such as the full version of Google Maps.…You can make a decision to simply pass the location…to the full version of Google Maps and let the…user get point to point directions, find related attractions, and…do all the other things that Google Maps does so well.…
And not try to implement everything in your app.…And I'll show you how to pass…that information over in this project TourFinderPassLocation.…In the app's current state there's a menu item…that appears on the action bar. It's labelled "More Details".…When the user touches it, right now nothing happens.…But there is code in the app right now, that's handling that event.…It's in the method onOptionsItemSelected in the class tour detail activity.…
Note: An Android device with Android 3.0 (Honeycomb) or higher, and that has Google Play Store installed, is required to use the course exercises. (Kindle Fire and Nook devices do not qualify.) Finished mapping apps can be deployed on Android 2.2 (Froyo) or later.
- Setting up the developer tools
- Adding required permissions
- Getting a Google Maps API key
- Importing and linking the Google Play services
- Setting a map's initial state
- Geocoding an address
- Getting the current location programmatically
- Adding map markers
- Handling marker events
- Drawing lines, polygons, and circles
- Adding maps to existing apps