get location without google play services -android

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.

Answers


you can use LocationManager

LocationManager locationManager = (LocationManager) getApplicationContext().getSystemService(LOCATION_SERVICE);

Location location = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);

Just use the location manager like you said

http://developer.android.com/guide/topics/location/strategies.html


USe a LocationManager and set the appropriate provider, GPS or NETWORK. you can get periodic updates or a single update using the requestLocationUpdates() and the getLastKnownLocation() methods respectively. Lastly, get a Location object and retrieve the latitude, longitude by calling the required methods on the Location object.


Need Your Help

Monitoring the progress of an SQL query in SQL SERVER

database sql-server-2005 monitor progress

I saw a similar question which asked how to monitor the progress of a backup/restore operation:

LINQ to SQL using GROUP BY and COUNT(DISTINCT)

c# linq linq-to-sql

I have to perform the following SQL query: