0

I want to get my device position.

sometimes current position on demand and sometimes periodically every 5 mins

(even when the application is not visible).

I have used LocationListener + LocationManager.

   LocationListener locListener = new MyLocationListener();
    locManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0,
            locListener);

   LocationListener locListener = new MyLocationListener();
    locManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0,
            locListener);

but i see in Android dev site the use of LocationClient

Why should I opt one of them over the other?

is LocationClient for GPS provider only?

Elad Benda
  • 35,076
  • 87
  • 265
  • 471

1 Answers1

0

The question your are asking has been partly answered here LocationClient vs LocationManager Hope that helps

Community
  • 1
  • 1
Napho
  • 1
  • 4