vmadalin / easypermissions-ktx

🔓 Kotlin version of the popular google/easypermissions wrapper library to simplify basic system permissions logic on Android M or higher.
https://firebaseopensource.com/projects/googlesamples/easypermissions/
Apache License 2.0
383 stars 38 forks source link

showing permission required laert #19

Closed FaisalThreestops closed 1 year ago

FaisalThreestops commented 1 year ago

Basic Information

Device type: pixel 6 OS version: version 13 EasyPermissions version: com.vmadalin:easypermissions-ktx:1.0.0

Describe the problem

when I try to open file structure for file uploading . its showing permission alert. its working below android version 12.

Code and logs

image

val perms = arrayOf(
            Manifest.permission.CAMERA,
            Manifest.permission.READ_EXTERNAL_STORAGE,
            Manifest.permission.WRITE_EXTERNAL_STORAGE
        )
if(EasyPermissions.hasPermissions(this, perms = perms)){
          //do action here -missing code here for security
        }else {
            EasyPermissions.requestPermissions(
                host = this,
                rationale = getString(R.string.permission_location_and_contacts_rationale_message),
                requestCode = 123,
                perms = perms
            )
        }
FaisalThreestops commented 1 year ago

Basic Information

Device type: pixel 6 OS version: version 13 EasyPermissions version: com.vmadalin:easypermissions-ktx:1.0.0

Describe the problem

when I try to open file structure for file uploading . its showing permission alert. its working below android version 12.

Code and logs

image

val perms = arrayOf(
            Manifest.permission.CAMERA,
            Manifest.permission.READ_EXTERNAL_STORAGE,
            Manifest.permission.WRITE_EXTERNAL_STORAGE
        )
if(EasyPermissions.hasPermissions(this, perms = perms)){
          //do action here -missing code here for security
        }else {
            EasyPermissions.requestPermissions(
                host = this,
                rationale = getString(R.string.permission_location_and_contacts_rationale_message),
                requestCode = 123,
                perms = perms
            )
        }

Not use permission like Manifest.permission.CAMERA. this is not support above 12 version.

Answer:- val perms = arrayOf( Manifest.permission.CAMERA, )