Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

get location without google play services -android

Tags:

I know some phones do not preinstall google play sevice. I want to ask is there possible way to get location without Google Play Services , just use LocationManager. Not LocationClient.

like image 573
user2506173 Avatar asked Jul 18 '13 14:07

user2506173


1 Answers

you can use LocationManager

LocationManager locationManager = (LocationManager) getApplicationContext().getSystemService(LOCATION_SERVICE);  Location location = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER); 
like image 59
Onur A. Avatar answered Oct 15 '22 02:10

Onur A.