No logs and my other apps which receive shared selected images by the user (directly via Gallery, select & share to my app not using CC) work with no problems. Nothing in the logs (even unfiltered), no exception. On my other Xiaomi phone (9 T Pro) with Android 10 it works.
Private Sub Button1_Click
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
ImageView1.SetBitmap(xui.LoadBitmap(Dir, FileName))
End If
End Sub
It can happen, usually in older devices, where the process is killed while the app is in the background.
Erel's example works on my Pixel 4A with Android 11.
I have a Xiaomi Mi Max 3 and a Redmi Note 9 Pro with Android 10 and they seem to be quite aggressive at killing processes. B4A Bridge doesn't live long in the background. I think this is characteristic of Xiaomi devices so Erel's guess might be correct.
If you are fed up with the intrusive adds everywhere see the attached. I wouldn't now buy another Xiaomi , Redmi or Pocophone device again.
That's not what I said. I merely observed that they seem to be quite aggressive at killing processes, Whether that is happening here or not I have no idea.
OffTopic:
Not my experience. Of course every not well knows app has a low engergie profile (which you can change manually). @agraham : I don't have any ads, neither on my Mi 9 T Pro nor on my 10 T Pro
Little update: Yesterday my Mi 9 T Pro got updated to Android 11. CC still works here but not with my 10 T Pro. The Filemanager app has the same version on both phones. I reported this issue to Xiaomi.
In the developer options you have to enable MUI optimisations On my 9t Pro is was enabled by default, on my 10t Pro not. Found this hint somewhere in the www.
Even other apps like K9 (mail apps) had issues with selecting files (e.g. attachements) which is solved with this solution, too