Opening a given folder in the standard gallery of the phone

knovos

Member
Licensed User
Longtime User
Hi to you all.

I have made an App that stores pictures in a folder at the local storage card from the phone, the folder is named 'intervalpictures'.

With a push on a button I want to leave the App and start the standard gallery of the phone which opens the folder 'intervalpictures'.

I hope there is a connection possible, something like this:
B4X:
StartActivity(main.OpenBrowser("http://www.webaddress.com"))
but than for standard gallery of a phone.

Any suggestions to make this button work:
B4X:
Sub gallery_Click 'button pushed
??????
End Sub

Kind regards,
Knovos
 

knovos

Member
Licensed User
Longtime User
I put the code between the subs for the button
B4X:
Sub gallery_Click 'button pushed
Dim i As Intent                
i.Initialize(i.ACTION_PICK, "")
i.SetType("IMAGE/*")
StartActivity(i)
End Sub
I get this error:
error1.png

Please some help, I can not see what is wrong.
Am I missing a lib?
Knovos
 
Last edited:
Upvote 0

Kwame Twum

Active Member
Licensed User
Longtime User
that's cool, but how do you return a selected image from the gallery?
e.g If you're selecting a picture to use in the current activity.
 
Upvote 0
Top