Android Question Open the image gallery

antofer

Member
Licensed User
Longtime User
hello
using translator ......

I would like to know how I can open the image gallery by clicking on a imageView for the user to select one of them and the application for the path of the selected image

thank you very much
 
Thank you very much .....

opens the gallery but how do I get the address of the selected file?

feel the awkwardness ....... learning
 
Upvote 0
**Use Phone library

Code: Copy
 Dim Chooser As ContentChooser
   Chooser.Initialize("chooser")
   Chooser.Show("image/*", "Select an image")


Code: Copy
Sub chooser_Result (Success As Boolean, Dir As String, FileName As String)
    If Success Then
        ImageView1.Bitmap=LoadBitmap(Dir,FileName)
    Else
        ToastMessageShow("No image selected", True)
    End If
End Sub

add this line to "Project" Menu > Manifest Editor
Code: Copy
AddPermission(android.permission.READ_EXTERNAL_STORAGE)
 
Upvote 0
Back
Top