HW7 - Ghebrehiwet/AndroidAboutG GitHub Wiki

This week you learned how Android applications can detect device location and present detailed location information.

Now you'll apply this knowledge to the application you've been building for this class.

Update your application with a new activity that:

detects the user's location displays current location details including latitude, longitude, city, state, and zip code displays current location on a map

You can refer to these applications for examples of key functionality your app will need to implement:

Getting location - https://github.com/googlesamples/android-play-location (Links to an external site.)Links to an external site. Converting location address - https://developer.android.com/training/location/display-address.html (Links to an external site.)Links to an external site. Displaying a map - https://developers.google.com/maps/documentation/android-api/map-with-marker (Links to an external site.)Links to an external site. https://developers.google.com/maps/documentation/android-api/current-place-tutorial (Links to an external site.)Links to an external site.

Note

you will need to provide your own Google Maps API key the sample applications may have more functionality than is required for this assignment, the samples pre-date v10.x of the Google Play services, which has different components for specific services. See the guide for the location/map related services you'll need: https://developers.google.com/android/guides/setup (Links to an external site.)Links to an external site. (Links to an external site.)Links to an external site.

The sample apps pre-date recent changes to Android permissions and don't show the newly required check for access permissions: @Override public void onConnected(Bundle connectionHint) { if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) ==PackageManager.PERMISSION_GRANTED){ mLastLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient); } ... }