You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 14, 2023. It is now read-only.
Hi, I am writing a watchface that consumes the yr.no API (https://www.yr.no/api/swagger/ui/index) instead your OpenWeatherMap weather data. The reason for that is because I want an hourly weather graph with at least three day info. Everything is working so far, even the 'internet companion' feature of AmazMod that lets me doing REST calls using the bluethooth data connection.
As the yr.no API needs the current latitude/longitude, I managed to retrieve it this way:
finalStringweatherInfoJson = Settings.System.getString(service.getApplicationContext().getContentResolver(), "WeatherInfo");
// Extract data from JSONJSONObjectweather_data = newJSONObject(weatherInfoJson);
if (weather_data.has("lat") && weather_data.has("lon")) {
floatlat = (float) weather_data.getDouble("lat");
floatlon = (float) weather_data.getDouble("lon");
WeatherData.INSTANCE.setLat(lat);
WeatherData.INSTANCE.setLon(lon);
}
However, the latitude/longitude is truncated to 2 decimal positions, resulting in very poor positioning. Is there a way to retrieve more accurate coordinates from AmazMod?
The text was updated successfully, but these errors were encountered:
Hi, I am writing a watchface that consumes the yr.no API (https://www.yr.no/api/swagger/ui/index) instead your OpenWeatherMap weather data. The reason for that is because I want an hourly weather graph with at least three day info. Everything is working so far, even the 'internet companion' feature of AmazMod that lets me doing REST calls using the bluethooth data connection.
As the yr.no API needs the current latitude/longitude, I managed to retrieve it this way:
However, the latitude/longitude is truncated to 2 decimal positions, resulting in very poor positioning. Is there a way to retrieve more accurate coordinates from AmazMod?
The text was updated successfully, but these errors were encountered: