I am getting the GPS value in background. For that Am using Service for background process. If GPS is disabled means, I used the below code.
Intent myIntent = new Intent(android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS);
It is working when the app is running in the foreground, but it is not working in the background.
I also use the AlarmManager and a BroadcastReceiver.
Can anyone please help me?