0

I am using Google Accompainst library in my android jetpack compose project to request permissions. I am trying to request SYSTEM_ALERT_WINDOW permission, but it is not working.

permissionState.status is always Denied(shouldShowRationale=false)

My Code

@Composable
fun Screen(){

    val drawOverPermission = Manifest.permission.SYSTEM_ALERT_WINDOW

    val drawOverPermissionState = rememberPermissionState(permission = drawOverPermission)

// ...basic scaffold... 
   Button(onClick = {
      drawOverPermissionState.launchPermissionRequest() // not working
     },
   )

}

What am I doing wrong ?

Lino
  • 5,084
  • 3
  • 21
  • 39
Chandra Shekhar
  • 3,550
  • 2
  • 14
  • 22

0 Answers0