Android Question ¿how to choose gallery image?

Duque

Active Member
Licensed User
Longtime User
Colleagues
I need to get a gallery image and I do not get it, I thought it would be simple with this

B4X:
'intt <-- variable Intent en Sub Globals

intt.Initialize("android.intent.action.GET_CONTENT", "file:///")
intt.setType("image/*")


Sub Activity_Resume
If intt.IsInitialized Then
  Log("getdata "&    intt.GetData)  
End If
End Sub

I do not get anything in the activity summary, I wanted to recover the address of the image and then do something with it...

¿I missed an Intent event?

help !
 

ronell

Well-Known Member
Licensed User
Longtime User
try this
B4X:
Sub btn_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)

End Sub
 
Upvote 0
Top