Android Tutorial 💡 Retrieving 2 JSON data feeds from an online server (Wear OS watch face) - Newer developers

Peter Simpson

Expert
Licensed User
Hello All
Here we have a simple example of how you use corwin42s WatchFace Library. The WatchFace library is extremely simple to use, corwin42 has done a great job wrapping it, thank you.

In this example we not only show the battery level, time and date using a custom font, but we also load JSON data from the internet to display information.

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 LEDCoronavirus.zip - Original file (2 downstairs)
LEDCoronavirus_V1.0.0.1.zip - Optimised and removed unnecessary code, tidied up the Manifest.

Libraries needed:
1586780705241.png


App running on a LG smartwatch
IMG_20200413_160339_2.png


Watch face with flashing seconds dots
Tap the bottom 2 lines to update the figures

Face.png


Settings screen
Settings-1.png


Color settings
Settigs-2.png


Country selection
Settings-Country.png


Color picker
Color-picker.png



Enjoy...
 

Attachments

Last edited:

MikeFree

Member
Trying to run the example .. but i get following message:

error in line: 22 (LEDCorona)
Private LEDWFManager As WFManager

which Library has to add ?
 

Peter Simpson

Expert
Licensed User
which Library has to add ?
Hello,
I can confirm that all you need are the libraries in the screenshot snip below. You need the WFManager from the link below.

1586780705241.png



Enjoy...
 

Peter Simpson

Expert
Licensed User
@MikeFree STOP STOP STOP, you have gotten your post mixed up. Basically you are posting in the wrong thread.
The screenshots that you provided are for the original library tutorial by @corwin42 and is not for my tutorial in this thread.

You are in fact using the original code from the link below and not my code.
You should post a new question in the forum about your issue, but first read the instructions from the original post in the link below.

By the way, to FIX your issue above, you NEED to install ABExtDrawing library V1.7 from the link below.

Enjoy...
 
Last edited:
Top