In the android manifest file I have added the below permissions for gps to access the location
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
I am fecthing Location Updates as below using Location Manager Class
private static final long MIN_DISTANCE_CHANGE_FOR_UPDATES = 10; // 10 meters
private static final long MIN_TIME_BW_UPDATES = 1000 * 60 * 1; // 1 minute
locationManager.requestLocationUpdates(
LocationManager.GPS_PROVIDER,
MIN_TIME_BW_UPDATES,
MIN_DISTANCE_CHANGE_FOR_UPDATES,
this
);
But the above line is giving an exception stating
"gps" location provider requires ACCESS_FINE_LOCATION permission
This thing only happens with the targetSDKVersion 23(i.e with android 6.0) and i have also tested in android 5.1 which works fine.
Please Help!!.Thanks in Advance.