-
-
Save hichamboushaba/5413ac2a1bda575acf5c6945ffd73083 to your computer and use it in GitHub Desktop.
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
class MyViewModel(private val permissionManager: PermissionManager): ViewModel() { | |
fun onButtonClicked() { | |
viewModelScope.launch { | |
val permissionStatus = permissionManager.requestPermission(Manifest.permission.ACCESS_FINE_LOCATION) | |
// handle the result | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment