Blank images on Android 10
Works fine till Android 9 but on Android 10 it shows blank images. All images are white.Whats the solution?
I am facing the same issue
Any solution to this problem?, i am facing the same issue.
Any solution to this problem?, i am facing the same issue.
Use this attribute in application Tag of Manifest File
android:requestLegacyExternalStorage="true"
I am facing the same issue
Use this attribute in application Tag of Manifest File
android:requestLegacyExternalStorage="true"
I have android:requestLegacyExternalStorage="true" in manifest but it is not effecting on android 10, i target android 10.
I came across this library implementation 'com.github.onimur:handle-path-oz:1.0.7' it support me to fix this issue for now.
I came across this library implementation 'com.github.onimur:handle-path-oz:1.0.7' it support me to fix this issue for now.
Hello. Can you show or send some examples. How did you handled this bug
I came across this library implementation 'com.github.onimur:handle-path-oz:1.0.7' it support me to fix this issue for now.
hey, can you tell us how did you use your solution ?
Try to update to the latest version
implementation 'io.github.ParkSangGwon:tedimagepicker:1.2.7'
Then use the following lines of code. Checking if android is >10 and getting the Uri as follows sorted the issue
TedImagePicker.with(this)
.errorListener(new OnErrorListener() {
@Override
public void onError(@NonNull Throwable throwable) {
Timber.e(throwable.getMessage());
}
})
.mediaType(MediaType.IMAGE)
.start(uri -> {
File file = new File(uri.getPath());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
String[] filePathColumn = {MediaStore.MediaColumns.DATA};
Cursor cursor = App.getContext().getContentResolver().query(
uri,
filePathColumn,
null,
null,
null);
if (cursor != null) {
if (cursor.moveToFirst()) {
int columnIndex = cursor.getColumnIndex(filePathColumn[0]);
String absolutePathOfImage = cursor.getString(columnIndex);
if (absolutePathOfImage != null) {
Uri.parse(absolutePathOfImage);
file = new File(absolutePathOfImage);
}
cursor.close();
}
}
}
});