pveierland / aix-weather-widget Goto Github PK
View Code? Open in Web Editor NEWGraph weather widget for Android
Graph weather widget for Android
We will soon be deprecating the locationforecast/1.9 service, which means the app must be updated to work with version 2.0 to continue working.
At the same time, you should rewrite the app to spread the traffic evenly over time instead of making a huge spike every hour on the dot. While our models are computed with hourly intervals, the updates are not distributed at exact times and data are cached with random expiry times to even out traffic. This is the traffic count from aix weather widget this morning:
237 07:57
281 07:58
307 07:59
2238 08:00
3545 08:01
4195 08:02
2704 08:03
1877 08:04
1665 08:05
1435 08:06
1086 08:07
844 08:08
777 08:09
728 08:10
Every hour there is a spike of sometimes > 4000 req/min, which is way over the 1200 allowed by the TOS. This results in half of the traffic being throttled with a 429 response. I suggest adding a random amount of minutes for each installation to spread the traffic out over the whole hour.
Geir Aalberg
API developer
MET Norway
Just stumbled upon your repo, and looked whether it's possible to install your app without Google Play. Found the APKs, but โฆ
It's a bad idea to keep them inside the repo โ it bloats the repo, possible contributors would have to take them all along (huge overhead) when forking/cloning. May I suggest a much better approach? Use Releases. The changelog.txt
then goes into the description, the *.apk
becomes an attachment. Lots of advantage:
The application stop working on Android 11 Beta. Message "Problem Loading the Widget"
Weather data cannot be fetched since the last 24h.
v32.
Also several comments in playstore hint at this problem.
I get always this error:
2019-01-03 17:50:40.783 801-948/? W/SurfaceFlinger: Attempting to set client state on removed layer: net.veierland.aix/net.veierland.aix.AixConfigure#1
2019-01-03 17:50:40.783 801-948/? W/SurfaceFlinger: Attempting to set client state on removed layer: Dim Layer for - Task=3463#0
2019-01-03 17:50:40.783 801-948/? W/SurfaceFlinger: Attempting to destroy on removed layer: net.veierland.aix/net.veierland.aix.AixConfigure#1
2019-01-03 17:50:40.783 801-948/? W/SurfaceFlinger: Attempting to destroy on removed layer: Dim Layer for - Task=3463#0
2019-01-03 17:50:41.594 5463-5463/? W/InputEventReceiver: Attempted to finish an input event but the input event receiver has already been disposed.
2019-01-03 17:50:43.034 612-612/? W/auditd: type=1400 "thermal-engine""u:object_r:system_prop:s0""tmpfs"
2019-01-03 17:50:43.034 896-1033/? E/libc: Access denied finding property "sys.thermal.para"
2019-01-03 17:50:43.177 5463-28234/? W/System.err: java.lang.IllegalArgumentException: Invalid Region.Op - only INTERSECT and DIFFERENCE are allowed
2019-01-03 17:50:43.177 5463-28234/? W/System.err: at android.graphics.Canvas.checkValidClipOp(Canvas.java:779)
2019-01-03 17:50:43.177 5463-28234/? W/System.err: at android.graphics.Canvas.clipRect(Canvas.java:918)
2019-01-03 17:50:43.177 5463-28234/? W/System.err: at net.veierland.aix.widget.AixDetailedWidget.drawTemperature(AixDetailedWidget.java:1018)
2019-01-03 17:50:43.177 5463-28234/? W/System.err: at net.veierland.aix.widget.AixDetailedWidget.render(AixDetailedWidget.java:228)
2019-01-03 17:50:43.177 5463-28234/? W/System.err: at net.veierland.aix.AixUpdate.renderWidget(AixUpdate.java:234)
2019-01-03 17:50:43.177 5463-28234/? W/System.err: at net.veierland.aix.AixUpdate.updateWidgetRemoteViews(AixUpdate.java:265)
2019-01-03 17:50:43.177 5463-28234/? W/System.err: at net.veierland.aix.AixUpdate.process(AixUpdate.java:117)
2019-01-03 17:50:43.177 5463-28234/? W/System.err: at net.veierland.aix.AixService.updateWidget(AixService.java:166)
2019-01-03 17:50:43.177 5463-28234/? W/System.err: at net.veierland.aix.AixService.onHandleWork(AixService.java:100)
2019-01-03 17:50:43.177 5463-28234/? W/System.err: at android.support.v4.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:391)
2019-01-03 17:50:43.177 5463-28234/? W/System.err: at android.support.v4.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:382)
2019-01-03 17:50:43.177 5463-28234/? W/System.err: at android.os.AsyncTask$2.call(AsyncTask.java:333)
2019-01-03 17:50:43.177 5463-28234/? W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
2019-01-03 17:50:43.177 5463-28234/? W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
2019-01-03 17:50:43.177 5463-28234/? W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
2019-01-03 17:50:43.177 5463-28234/? W/System.err: at java.lang.Thread.run(Thread.java:764)
2019-01-03 17:50:48.037 896-1033/? E/libc: Access denied finding property "sys.thermal.para"
2019-01-03 17:50:48.038 612-612/? W/auditd: type=1400 "thermal-engine""u:object_r:system_prop:s0""tmpfs"
2019-01-03 17:50:48.399 5463-5472/? W/System: A resource failed to call end.
Looks like a permanent compatibility problem with Android 11, as the widget won't load.
Many thanks for years of service!
When I switch on my phone in the morning I often find AIX still showing the weather data from the previous day.
As there is no date shown I cannot distinguish if the weather data has yet been updated or not.
I think it would be best to show the weekday of the weather data in the upper left or right corner to easily solve the issue.
I prefer weekday over actual date as I live (like most) by weekday and thus know it better than the actual day number.
I just downloaded this from Google play, inserted by city of Oakland California, and the widget then displays a series of error messages that it is trying to fetch NWS data, and that it's delaying before trying again, before ultimately saying "failed to get weather data" . Maybe the NWS server is just down right now, but I wanted to send am issue in case it's a issue with the software. I also try to second time with San Francisco California, same result.
Since the latest update (0.1.9.19-33, or one of the prior), I noticed the widget is not using the full screen width (portrait mode) anymore. As a result, there are only three hours displayed: 01, 07, 13.
Once this was able to display at least every 2h and use the full width. Why has there been a change??
If that matters, using Android 6.0.1
I can only allocate a minimal amount of time to this app and will not spend further time developing it, but please email me via Google Play if you wish to become a maintainer or plan an improvement of the app.
I've been using aix-weather-widget-donate for the past two years and still haven't found a replacement!
Any more details to what extent you'll maintain this project? Do you see foresee major breaking changes in future android api's?
Hi @guillaumehuet and @pveierland
AIX was not working for a few days, and today I decided to do some investigation.
After googling, I found you guys here.
This link https://play.google.com/store/apps/developer?id=Per+Magnus+Veierland no longer exists, and the AIX app also disappeared.
I simply love this app. Can I provide any help?
I hope all is well with both of you.
Best
Marco
In AixNoaaWeatherData.java near line 478, the URL format is:
"https://www.weather.gov/forecasts/xml/sample_products/browser_interface/ndfdXMLclient.php"
+ "?lat=%.3f&lon=%.3f&product=time-series"
I tried requesting that URL with "curl" on the command line, and I got a 301 Moved Permanently.
I then tried the redirect URL, but I got XML with an embedded error message of "No data were found" until I specified the NDFD Element Names needed. As far as I can tell, the items needed by AIX are: temp, qpf, rh, and icons
Here is a list of all element names: https://graphical.weather.gov/xml/docs/elementInputNames.php
The widget is working again when I replace the above URL format with this one:
"https://graphical.weather.gov/xml/sample_products/browser_interface/ndfdXMLclient.php"
+ "?lat=%.3f&lon=%.3f&product=time-series&temp=temp&qpf=qpf&rh=rh&icons=icons"
As of March 1st, 2021, the old versions of Locationforecast (1.9), Nowcast (0.9) and Weathericon (1.1) are terminated.
Shows "Failed to get weather data".
On my previous device with an older version (Cyanogenmod 13) it worked perfectly. Anybody got this to work on Android 9?
I love the simplicity of this widget. Would be great to have it on my homescreen again
Would it be feasible to add an option for the location to automatically upstate based on device location, rather than requiring users to manually add and select a new location?
It looks like they have dropped the API that this widget was using: https://api.met.no/
Termination of old versions
Now that both products have been finalized, we have decided it is time to say goodbye to
the old versions, hailing from 2014 and 2016 respectively. On March 1st, 2021 the
following products will no longer be available:
Locationforecast 1.9
Nowcast 0.9
Weathericon 1.1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.