Android Question How to download string from a website as a JSON

Erind Jushaj

Licensed User
Hi everyone,

I have spent a few days looking online but I could not find anywhere a solution thats why I am asking here.

There is a certain (type) of website which I would like to load on my app and download the info from it. For example: will give a result such as {"USDT":3803.67}. I would like to download this info so that later I can use the values from it. I have done something similat in VBA Excel where I download it as a JSON and modify it further.

Can someone please help?

Many thanks


Licensed User
Longtime User
Upvote 0


Licensed User
Longtime User
Based on the 2 links @DonManfred provided you with in post #2, and since it is your first post in the forum, here is the complete code you need in the project:
Sub Activity_Create(FirstTime As Boolean)
    DownloadString    'IMPORTANT: need Json and OkHttpUtils2 libraries
End Sub

Sub DownloadString
    Dim j As HttpJob
    j.Initialize("", Me) 
    Wait For (j) JobDone(j As HttpJob)
    If j.Success Then
        Dim parser As JSONParser
        Dim root As Map = parser.NextObject
        Dim USDT As Double = root.Get("USDT")       
        Log("USDT= " & USDT)  'displays: USDT= 3823.19  .The value changes slightly every time you run
    End If
End Sub
Upvote 0