mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2025-12-15 18:28:47 +00:00
Added temporary fix to ACCESS_FINE_LOCATION permission error
This commit is contained in:
parent
3b1b787a7a
commit
65e0b30eb2
@ -94,7 +94,17 @@ public class MainActivity extends AppCompatActivity implements CreateListDialogF
|
|||||||
0
|
0
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Location location = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER);
|
Location location;
|
||||||
|
|
||||||
|
while(true) {
|
||||||
|
try {
|
||||||
|
location = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER);
|
||||||
|
break;
|
||||||
|
} catch(java.lang.SecurityException e) {
|
||||||
|
//User clicked delete
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(location != null) {
|
if(location != null) {
|
||||||
double longitude = location.getLongitude();
|
double longitude = location.getLongitude();
|
||||||
double latitude = location.getLatitude();
|
double latitude = location.getLatitude();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user