Search This Blog

Sunday 24 June 2012

Location Aware Android Apps

Location aware android platform provide a rich set of features you can build in your application which depends on the location information.

Android platform provides the android.location package to create the location aware applications.

The core component of the Android Location package is LocationManager which provides the APIs to determine the device location.Location Manager is the system service provides an internal layer to device to determine the location awareness.

Location Manager instance could not be created directly as this is a system services and you could get an instance of the location manager using the getSystemService API. The API return a handle to the location service.


Once your application has a LocationManager, your application can do following things
  • Query for the list of all LocationProviders for the last known user location.
  • Register/unregister for periodic updates of the user's current location from a location provider (specified either by criteria or name).
  • Register/unregister for a given Intent to be fired if the device comes within a given proximity (specified by radius in meters) of a given lat/long.
There are two types of location providers you can use to determine the user position.

1) GPS Based Provider - GPS based provider is more accurate but limited to outdoors. GPS Providers consumes more power and take a bit of time to determine the user location.

2) Network Location Based Provider- Android Network Location based provider determines the user location based on the mobile tower location, Wi-Fi Signals, so this works for outdoors and indoors.
The response time is fast and the overall battery power consumption is low.

You can use one or multiple providers to determine the location of the user and provide lot of smart informative apps for the user.





No comments:

Post a Comment