LocationHelper
Android library project that helps you to track user location and manage the updates.
Install / Use
/learn @jaisonfdo/LocationHelperREADME
LocationHelper
This is a sample Android application to show how to <B> track user's location and manage the updates</B>

Getting current location through <B>FusedLocationAPI</B> provided by Google is a bit tricky to implement, but the below step-by-step guidelines will explain the procedure.
- First, you need to add the needed dependency in your <B>build.gradle</B> file.
- Then add the following permissions into the <B>AndroidManifest.xml</B> file.
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
-
Next is permission check, From Android 6.0 user can deny the permission request, so before try to get the location we need to check the status of the location access. For this use <a href="https://github.com/jaisonfdo/PermissionExample/blob/master/app/src/main/java/droidmentor/permissionexample/PermissionUtils.java">PermissionUtil</a> class.
-
For making a connection with Location API, need to create an instance of <B>GoogleApiCLient</B>.
- At next implement the <B>OnConnectionFailedListener</B> and <B>ConnectionCallbacks</B> for managing the GoogleApiclient connection.
- For refreshing the location of the device at regular intervals, use <B>LocationRequest</B> objects.
- Then check the google play service availability, if available get the last known location of the user's device from the Location service as follows.
- Using the <B>Geocoder</B> class you can get the address from the above location.
For more information, check out my detailed guide here : http://droidmentor.com/get-the-current-location-in-android/
