Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android 13 Permission issue ,Please tell me what is missing in my code #278

Open
pradip-android opened this issue Sep 27, 2023 · 4 comments

Comments

@pradip-android
Copy link

pradip-android commented Sep 27, 2023

Describe the bug
i gave the all permission but still showed permission denied dialog.

My Manifest permission
  <uses-permission android:name="android.permission.CAMERA" />    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />    <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />    <uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />    <uses-permission        android:name="android.permission.WRITE_EXTERNAL_STORAGE"        android:maxSdkVersion="28" />    <uses-permission android:name="android.permission.ACCESS_MEDIA_LOCATION" />

My kotlin code
`binding.fab.setOnClickListener { view ->

        val options = Options().apply{
            ratio = Ratio.RATIO_AUTO                                    //Image/video capture ratio
            count = 15                                                   //Number of images to restrict selection count
            spanCount = 4                                               //Number for columns in grid
            path = "Pix/Camera"                               //Custom Path For media Storage
            isFrontFacing = false
            mode = Mode.All                                             //Option to select only pictures or videos or both
            flash = Flash.Auto                                          //Option to select flash type
            preSelectedUrls = ArrayList<Uri>()                          //Pre selected Image Urls
        }

        addPixToActivity(R.id.container, options) { it ->
            when (it.status) {
                PixEventCallback.Status.SUCCESS -> //use results as it.data
                {

                    val returnValue = it.data
                    Log.e("", "onActivityResult: ${returnValue.size}")
                   }
                PixEventCallback.Status.BACK_PRESSED -> // back pressed called
                {}
            }
        }

    }`

gradle file
`dependencies {

implementation 'androidx.core:core-ktx:1.8.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.navigation:navigation-fragment-ktx:2.7.3'
implementation 'androidx.navigation:navigation-ui-ktx:2.7.3'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
implementation  'io.ak1.pix:piximagepicker:1.6.3'

}`

Screenshots
Please find the screenshot
Screenshot 2023-09-27 at 7 09 56 PM

Device information

  • Device: [e.g. Realme ]
  • OS: [e.g. 13]
@mukul-kr
Copy link

@pradip-android I am also facing this same issue. Did you find any fix or any similar library that provides these implementation with latest api?

@arifaizin
Copy link

I hope we can get the replacement

@Rayhan-kh
Copy link

This is happening because in Android 13 and above android.permission.READ_EXTERNAL_STORAGE is replaced with android.permission.READ_MEDIA_IMAGES/VIDEOS.
But this repo has not updated "PermissionHelper" Class.

@heskadon
Copy link

heskadon commented Mar 9, 2024

is there any fixes for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants