Android Question Gallery Intent

udg

Expert
Licensed User
Longtime User
Hi all,

is there an Intent that works for Gallery similar to what Erel published for the Camera?
I'd like to comand the launch of the default Gallery app, choose one (or, even better, more files) and come back to my app where I could make use of those files.

I found an old post claiming that there is no standard Gallery app, so a works-everywhere Intent should be out of question, but maybe something changed in the meanwhile so my question. TIA.

udg
 

Star-Dust

Expert
Licensed User
Longtime User
I use this: (with Phone Library)

B4X:
Dim selectedimage As ContentChooser
selectedimage.Initialize("imgChooser")
selectedimage.show("image/*", "Choose image")

Sub imgChooser_Result(Success As Boolean, Dir As String, FileName As String)
If Success Then
   pec1.Bitmap = LoadBitmap(Dir, FileName)  
   pec1.Gravity = Gravity.FILL
   Else
   ToastMessageShow("Nessuna Immagine Selezionata", True)
   End If
End Sub
 
Last edited:
Upvote 0
Top