My application checks if GPS enabled and if not it asking user to enable it.
To lounch settings activity I use following code:
Intent intent = new Intent(Settings.ACTION_SECURITY_SETTINGS);
startActivity(intent);
But I need to enable or disable some controls on my activity depending on GPS status. I wonder how I can get result after user closes settings activity. Or maybe it’s possible to wait until settings activity closed and then check GPS status again?
Yes, you can check if GPS is enabled in your
onResume().