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()
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()