:android-wave: Hi There hope you all are doing goo...
# moko
h
👋 Hi There hope you all are doing good ! I am facing issue with ask media access permission after granted on android its still showing permission is not granted on android 13 and 14 but same app I run on 9,8 there its working fine. I have check there is google library for permission state handling
Copy code
com.google.accompanist:accompanist-permissions
is Moko is also using this library under the hood for remember permission state and permission result
here is sample code for multiple request
Copy code
val multiplePermissionState = rememberMultiplePermissionsState(
    permissions = permissions,
    onPermissionsResult = {
        val permissionsPermanentlyDenied = it.filter { permissionStatus ->
            !ActivityCompat.shouldShowRequestPermissionRationale(
                context.findActivity(),
                permissionStatus.key
            ) && !permissionStatus.value
        }.isNotEmpty()

        when {
            permissionsPermanentlyDenied && shouldShowDeniedDialog -> if (openSetting) {
                openDeniedDialog = true
            } else {
                isDenied.invoke()
            }

            it.all { permissionStatus -> permissionStatus.value } -> {
                isGranted.invoke()
            }

            else -> {
                isDenied.invoke()
            }
        }
    }
)