Android KWGT widget that displays the next upcoming Formula 1 race.
The API provides the widget with all the session data and start times needed by the widget.
It acts like a small proxy between the widget and the source F1 Calendar JSON formatting the JSON so that it can easily be consumed by the widget
The API has a single setting controlling which time zone to show the session times in. The setting can be changed using environment variables.
| Name | Value |
|---|---|
| TZ | TZ identifier taken from List of tz database time zones |
| BASE_URL | Base Url where the api is hosted |
Click pictures to download the widget
Alpine, Alpine2, Audi, Mercedes
- Add a KWGT widget to your home screen.
- Open KWGT, select Load Preset, and import the downloaded .kwgt file (skip if already in Kwgt/Kustom/widgets).
- Based on the current year we get the correct JSON from the F1 Calendar GitHub
- Order the races based on the FP1 start times
- Find the first race that has a session in the future
- Convert session times to configured time zone
- Format session times to fit on the widget
- Based on the latitude and longitude of the next race find the matching circuit
- Based on the current year find the matching circuit layout
- Get the current layout svg url to display on the widget
The widget requires a JSON model likes this:
{
"race": {
"location": "Sao Paulo",
"fp1": "01 Nov 15:30",
"fp2": null,
"fp3": null,
"qualifying": "02 Nov 19:00",
"sprint": "02 Nov 15:00",
"gp": "03 Nov 18:00"
},
"circuit": {
"layoutSvgUrl": "...",
"layoutPngUrl": "..."
}
}



