Presentation is loading. Please wait.

Presentation is loading. Please wait.

Location-Aware 吳俊興 國立高雄大學 資訊工程學系 CSF645 – Mobile Computing 行動計算

Similar presentations


Presentation on theme: "Location-Aware 吳俊興 國立高雄大學 資訊工程學系 CSF645 – Mobile Computing 行動計算"— Presentation transcript:

1 Location-Aware 吳俊興 國立高雄大學 資訊工程學系 CSF645 – Mobile Computing 行動計算 http://developer.android.com/training/location/

2 Making Your App Location-Aware New Location Services API available in Google Play services facilitates –Adding location awareness to your app with automated location tracking, geofencing, and activity recognition 2

3 Retrieving the Current Location Location Services sends the current location to your app through a location client, which is an instance of the Location Services class LocationClient –All requests for location information go through this client Specify App Permissions –Android has two location permissions: ACCESS_COARSE_LOCATION and ACCESS_FINE_LOCATION Requesting ACCESS_FINE_LOCATION implies a request for ACCESS_COARSE_LOCATION –For example, to add ACCESS_COARSE_LOCATION, insert the following as a child element of the element: To get the current location, create a location client, connect it to Location Services, and then call its getLastLocation() method 3


Download ppt "Location-Aware 吳俊興 國立高雄大學 資訊工程學系 CSF645 – Mobile Computing 行動計算"

Similar presentations


Ads by Google