Share your knowledge

Tuesday 10 January 2017

Location can be determined in Android Application By Two Ways:

 Location can be determined in Android Applications by two ways:
  1. Using NETWORK_PROVIDER
  2. Using GPS_PROVIDER
Using Network Provider: The network provider determines the location of the users using cell towers, wifi points and etc. This location provider is faster in response. This is mostly used to get location inside rooms or buildings.

Permissions required to use Network Provider are either,

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
 
or
 
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> 

Using Gps Provider: The GPS Provider determines the location of the users using satellites. The GPS receiver in the mobile receives the signals from satellites and process to determine exact locations, but it takes more time for response and causes delay. It works better in outdoors.

Permission required to use Gps Provider is,

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> 
 
 
 
sources from:
 
http://vastinfos.com/2016/07/difference-between-fine-and-coarse-locations-android-gps/

1 comment: