Skip to content

GetImageFromGallery returns null path on MIUI 12.5.7 (POCO M3) after picking an image #357

Description

@Prateek-LN2002

Environment:

Device: POCO M3
OS: MIUI 12.5.7.0 Global, Android 11 (RP1A.200720.011)
NativeGallery version: 1.9.4 (latest)
Gallery app: com.miui.gallery v3.5.7.24-global (installed via com.xiaomi.discover)

Repro:

NativeGallery.GetImageFromGallery((path) => {
if (path == null) { /* fires every time on this device */ }
}, "Select Profile Photo");
Call GetImageFromGallery — this launches com.miui.gallery/.picker.PickGalleryActivity (confirmed via ActivityTaskManager: START ... cmp=com.miui.gallery/.picker.PickGalleryActivity).
Pick any image from the picker.
Callback fires with path == null.
Works correctly on a non-MIUI Android device and on WebGL with the same app build, so this looks isolated to MIUI's own gallery picker not returning a result in the format GetImageFromGallery expects.

Logcat around the callback:

ActivityTaskManager: START u0 {act=android.intent.action.PICK dat=content://media/external/images/media typ=image/* cmp=com.miui.gallery/.picker.PickGalleryActivity ...}
...
Unity: [App log] Gallery pick cancelled (path null).
Unity: LevelSetupScripts.FLN_AvatarLoader:b__16_0(String)
Unity: NativeGalleryNamespace.NGCallbackHelper:Update()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions