Android Question ContentChooser return false Success

invocker

Active Member
this code return Success false on android 11 is it need a permission?

B4X:
Dim CC As ContentChooser
    CC.Initialize("cc")
    CC.Show("image/*", "choose image")
    Wait For CC_Result (Success As Boolean, Dir As String, FileName As String)
    Log(Success)
    If Success Then
        imgProfile.SetBitmap(xui.LoadBitmap(Dir, FileName))
        
        Else
        ToastMessageShow("Error Load Image",True)
    End If
 
Solution
MIUI optimization is unique to xiomi device. This is a feature that makes the user interface faster and smoother by sideloading applications and their data.
However, with optimization enabled, I found that apps running in the background stopped syncing data and couldn't set a third-party launcher.
Some apps, like Youtube Music Vanced, require MIUI optimization to be disabled on your smartphone to work properly.
Check the settings. For my part I also have a redmi 10 - MIUI 13.06 - android 12 and everything works correctly

invocker

Active Member
it let me to select image and go to this line ToastMessageShow("Error Load Image",True)
but when i turn on miui optimisation it work perfectly
 
Upvote 0

zed

Active Member
Licensed User
MIUI optimization is unique to xiomi device. This is a feature that makes the user interface faster and smoother by sideloading applications and their data.
However, with optimization enabled, I found that apps running in the background stopped syncing data and couldn't set a third-party launcher.
Some apps, like Youtube Music Vanced, require MIUI optimization to be disabled on your smartphone to work properly.
Check the settings. For my part I also have a redmi 10 - MIUI 13.06 - android 12 and everything works correctly
 
Upvote 0
Solution
Top