Skip to content Skip to sidebar Skip to footer

Selecting Image From Gallery Not Working On Redmi Note 4

I have seen a couple of other questions on S/O related to this, but the one that was closest to my issue doesn't seem to have got many responses (Xiaomi MI device not picking image

Solution 1:

So I was able to narrow down the issue to an incorrect file path. The Uri to filepath function did not get the desired result on all devices.

I used the approach suggested here:https://stackoverflow.com/a/7265235/3438497

and tweaked the code a little bit so that when picking images from gallery, I use the Uri of the image directly.

Solution 2:

The reason is that you get file:// uri back. not content:// so content resolver doesn't work.

Solution 3:

I am facing the similar issue in Redmi 5A. And solve the problem using following way.

Add below entities in your manifest file

android:hardwareAccelerated="false"

android:largeHeap="true"

It will work in some environments.

Refer answer at https://stackoverflow.com/a/32245018/2706551

Post a Comment for "Selecting Image From Gallery Not Working On Redmi Note 4"