RxPaparazzo
RxPaparazzo copied to clipboard
Android 11 issue
This library is not working in android 11
Hi any suggestions not working in android 11

You can try .useInternalStorage(). In my case it works! But the image will not be available in the device gallery.
![]()
You can try .useInternalStorage(). In my case it works! But the image will not be available in the device gallery.
Isn't working
Google stops accepting apps which are not compiling with api 30. Please fix this issue
![]()
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);
}
}
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
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>