I have used Android SDK Location Manager to get the user location.
I am requesting the location information by using Pending Intent. I have used pending intent because my need to send the location information even the app is not running.
Intent mLocationIntent = new Intent(mContext,
LocationIntentService.class);
mLocationUpdatePendingIntent = PendingIntent.getService(mContext, 1,
mLocationIntent, 0);
mLocationManager.requestLocationUpdates(
LocationManager.GPS_PROVIDER, 0, 0,
mLocationUpdatePendingIntent);
Once registered with the above code I am getting the location information at onHandleIntent of LocationIntentService class.
But I don't have the onProviderEnabled or onProviderDisabled method to listen for the gps and network provider status. And also I dont want to use the fused location api.
How can I achieve both of these by requesting the location update using Pending Intent. Or else any other way to register for location information and also for the location provider status.