I have made an android applicaiton (2.2) with GPS functionality.But I want to check GPS status in device is it turn on or turn off. But don't know how to check by programming. Please give me some advice for this question.
Thanks in advance. Edit:
Here is the code for location listener
lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
ll = new mylocationlistener();
lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, ll);
lm.addGpsStatusListener(this);
private class mylocationlistener implements LocationListener {
@Override
public void onLocationChanged(Location location) {
mLastLocationMillis = SystemClock.elapsedRealtime();
mLastLocation = location;
}