Hello,
I'm having trouble with the ContentChooser.
I don't know if it's a bug or something wrong with my code, but i'd like to grab a picture from my gallery or file manager.
Now the problem is that sometimes the image loads (and msgbox shows) and sometimes it just doesn't and it goes back to the menu. (without a msgbox being called.)
It has been tested on Android 2.3, Android 3.0 and Android 4.0.
The (unfiltered) logs doesn't show a lot but it do call this every time.
Any input on this?
Tomas
I'm having trouble with the ContentChooser.
I don't know if it's a bug or something wrong with my code, but i'd like to grab a picture from my gallery or file manager.
B4X:
If Position = 1 Then
Dim ivImage As ImageView
Dim cc As ContentChooser
ivImage.Initialize("ivImage")
imgView = ivImage
cc.Initialize("CC")
cc.Show("image/*","Choose an image file.")
End If
Sub CC_Result (Success As Boolean, Dir As String, FileName As String)
Msgbox("called","called")
If Success = True Then
imgView.Bitmap = LoadBitmap(Dir, FileName)
pnlEditor.AddView(imgView,pnlEditor.Width/2-50, pnlEditor.Height/2-50, 100, 100)
vw = imgView
Msgbox("This works!","Worked")
Else
Msgbox("Image failed to load.","Error")
End If
End Sub
Now the problem is that sometimes the image loads (and msgbox shows) and sometimes it just doesn't and it goes back to the menu. (without a msgbox being called.)
It has been tested on Android 2.3, Android 3.0 and Android 4.0.
The (unfiltered) logs doesn't show a lot but it do call this every time.
onActivityResult: IOnActivityResult was released
Any input on this?
Tomas