Android Question Open the image gallery

Discussion in 'Android Questions' started by antofer, Feb 24, 2015.

  1. antofer

    antofer Member Licensed 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
     
  2. NJDude

    NJDude Expert Licensed User

    Check THIS post:
     
    DonManfred and antofer like this.
  3. antofer

    antofer Member Licensed User

    Thank you very much .....

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

    feel the awkwardness ....... learning
     
  4. KZero

    KZero Active Member Licensed User

    **Use Phone library

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

    Code:
    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:
    AddPermission(android.permission.READ_EXTERNAL_STORAGE)
     
    mariobam, Vahe Melikian, Erel and 3 others like this.
  5. antofer

    antofer Member Licensed User

    thank you very much to both
    I work all perfect

    :):):)
     
    KZero likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice