B4A Class ImageInternetChooser: pick image icon up from Internet directly


Well-Known Member
Licensed User
End-users of some apps may need to choose small icons to save it into app's database.
But there was no tool to choose a needed icon in 2-3 taps, but the Internet is always under finger.
It seems, now it's possible.

No fully free services with API for image searching, with good big database, so... i invented the max universal way :)

I have made the class that helps
  • to search pictures by a needed URL
  • choose the needed icon
  • get it into your app.
  • OkHTTPUtils2
  • StringUtils
  • WebViewExtras, WebViewExtras2, WebViewSettings
Video: Class is in the project .ZIP file.
Comments, fixes and updates are welcome.



Last edited:


Well-Known Member
Licensed User
If it might be interesting - the separate "Internet Image Picker" provider app is also developed, in the 1st post.
App works as:
  • image grabber from Internet
  • gallery of the grabbed images
  • image sharing provider for other apps


Licensed User
I've implemented a similar solution using the free Pixabay API:

Dim API_KEY As String = "XXXXX"
        Dim res As String
        Dim GetImageJob As HttpJob
        GetImageJob.Initialize("GetAddress", Me)
        GetImageJob.Download("https://pixabay.com/api/?key=" & API_KEY & "&q=" & imgString & "&image_type=illustration&safesearch=true&pretty=true")
        Wait For (GetImageJob) JobDone(GetImageJob As HttpJob)
        If GetImageJob.Success Then
            Dim jp As JSONParser
            Dim m As Map = jp.NextObject
            Dim results As List = m.Get("hits")
            If results.Size > 0 Then
                Dim first As Map = results.Get(0)
                res = first.Get("webformatURL")
                'update ivMain with image
                SetImage(res, imgString)
            End If
        End If
You can get more information on the API parameters here