RxPaparazzo icon indicating copy to clipboard operation
RxPaparazzo copied to clipboard

Android 11 issue

Open akshayspaceo opened this issue 3 years ago • 7 comments

This library is not working in android 11

akshayspaceo avatar May 18 '21 11:05 akshayspaceo

Hi any suggestions not working in android 11

sandeep212chary avatar Aug 26 '21 12:08 sandeep212chary

You can try .useInternalStorage(). In my case it works! But the image will not be available in the device gallery.

galmax1 avatar Sep 14 '21 09:09 galmax1

You can try .useInternalStorage(). In my case it works! But the image will not be available in the device gallery.

Isn't working

HaneetGH avatar Nov 26 '21 14:11 HaneetGH

Google stops accepting apps which are not compiling with api 30. Please fix this issue

HaneetGH avatar Nov 26 '21 14:11 HaneetGH

You can try .useInternalStorage(). In my case it works! But the image will not be available in the device gallery.

I make it work a after adding useInternalStorage here add <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" android:minSdkVersion="30" /> in manifest

   and 

public void askForPermissions(boolean camera) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { if (!Environment.isExternalStorageManager()) { Intent intent = new Intent(Settings.ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION); startActivity(intent); return; } performImgPicAction(camera);

    }
}

HaneetGH avatar Nov 26 '21 14:11 HaneetGH

You can save your photos to external directory "/Pictures/MySomeDirectory" on Android 11 without additional permissions. Set custom values in file_provider_paths.xml:

<files-path name="MySomeDirectory" path="Pictures"/>

and init the RxPaparazzo using:

RxPaparazzo.register(context).withFileProviderPath("Pictures/MySomeDirectory")

UPD: As I understand, you can use at least 4 directories: DCIM, Download, Movies, and Pictures. Each of them described as "top-level public directory" here: https://developer.android.google.cn/reference/android/os/Environment#DIRECTORY_PICTURES

antaki93 avatar Feb 02 '22 19:02 antaki93

I added following queries to AndroidManifest.xml

<queries>
    <intent>
        <action android:name="android.media.action.IMAGE_CAPTURE" />
    </intent>

    <intent>
        <action android:name="android.intent.action.GET_CONTENT" />
        <data android:mimeType="image/*" />
    </intent>

    <intent>
        <action android:name="android.media.action.IMAGE_CAPTURE" />
    </intent>
</queries>

Zhuinden avatar Sep 25 '23 04:09 Zhuinden