Open fjr619 opened 3 months ago
just call providePermission multiple times
class ViewModel(val permissionsController: PermissionsController): ViewModel() {
fun onPhotoPressed() {
viewModelScope.launch {
try {
permissionsController.providePermission(Permission.GALLERY)
permissionsController.providePermission(Permission.CAMERA)
// Permission has been granted successfully.
} catch(deniedAlways: DeniedAlwaysException) {
// Permission is always denied.
} catch(denied: DeniedException) {
// Permission was denied.
}
}
}
}
@Alex009 Is the same applies if its for location permission?
Yes
Hi may i get example how to handle multiple permissions with moko? do i need create multiple controller for that too?