Android Tutorial ðŸ’¡ Retrieving 2 JSON data feeds from an online server - Shared module with B4i

Hello All
I might be a bit late to the show with this one, but I've been busy completing paid work. Hopefully new members will find this useful.

The B4i example can be found here

Here is a simple to follow B4A tutorial on how to retrieve JSON data from an online server, in this case I'm using a well known Coronavirus COVID-19 data feed. The project layout file can easily be copied and pasted into a B4i layout file, you can also place the code module into a shared folder as B4A and B4i both use the exact same shared code module.

I'm not sure how long the JSON feed will stay up, it maybe only months or several years. So I've decided to download the 2 current JSON feed files and attached them to this post for future reference, just to be on the safe side.

Edit:
Removed Android-CoronavirusCOVID-19.zip - Original file (30 downloads)
Android-CoronavirusCOVID-19_V1.0.0.1.zip - Optimised and removed unnecessary code, now retrieving JSON data using API V2, removed refresh timer, added update button.

PLEASE NOTE: - As you can see below, the attached images below are themed Orange, I have removed the color theme from the attached example.

Libraries needed:
1586818780636.png


Country results - Click image for explanation
Android-Main.png


Android country list
Android-List.png



Enjoy...
 

Attachments

  • JSON.zip
    12.3 KB · Views: 383
  • Android-CoronavirusCOVID-19_V1.0.0.1.zip
    62.2 KB · Views: 404
Last edited:
Top