Last active
February 24, 2018 14:17
-
-
Save gbzarelli/f86d05c9465775fafe43b2fe5c41ea14 to your computer and use it in GitHub Desktop.
Como saber o modo de configuração do GPS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val locationMode = Settings.Secure.getInt(getContentResolver(), Settings.Secure.LOCATION_MODE); | |
when (locationMode) { | |
Settings.Secure.LOCATION_MODE_OFF -> {/*TODO*/} | |
Settings.Secure.LOCATION_MODE_HIGH_ACCURACY ->{/*TODO*/} | |
Settings.Secure.LOCATION_MODE_BATTERY_SAVING -> {/*TODO*/} | |
Settings.Secure.LOCATION_MODE_SENSORS_ONLY -> {/*TODO*/} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment