frakbot / fweather Goto Github PK
View Code? Open in Web Editor NEWA weather widget for Android based upon Tobias van Scheider's Authentic Weather design.
Home Page: https://play.google.com/store/apps/details?id=net.frakbot.FWeather
A weather widget for Android based upon Tobias van Scheider's Authentic Weather design.
Home Page: https://play.google.com/store/apps/details?id=net.frakbot.FWeather
Then only print DEBUG log stuff when this is active. Verbose should be used when a system property is set (eg. adb shell setprop FWeather.debug true
).
Just because.
Add a toggle in the advanced customization settings (see #12) to use black instead of white as a base color for the text in the widget, to avoid issues with light backgrounds.
The user could want to open a proper weather app by clicking on the weather icon. Or not. Who cares.
Under some circumstances (still TBD) the widget gets stuck on the error message, and doesn't refresh.
Investigate this issue and produce a fix for it, plus more detailed informations on the kind of error that is causing the persistence of the condition. This status could be also displayed with a little info icon on the widget itself which gives access to the details on the configuration Activity.
Provided by Hansi Liu -- thanks!
Sarebbe bello se ci fosse un pannello per le impostazioni e all'interno la possibilità di scegliere ogni quanto aggiornare il widget, scegliere la località nel caso il widget non riuscisse a trovare il luogo corretto e la possibilità di modificare le frasi predefinite che si visualizzano sul widget perchè alcune sono ripetitive e monotone
Remove the refresh interval from the res/xml/fweather_info.xml
(set it to 0
) and implement it manually. See the documentation on http://developer.android.com/guide/topics/appwidgets/index.html
Reported by user, who saw up to 15 MB data DLs in 15 minutes. Only happens when data syncing interval is set to "never".
Lo mates!
This isnt an "Issue" (as it would be an "Enhancement") but i really dont know where to post it so i post it here.
I know the Temperature Info Text should be enough fucking info for the current weather but for the precise ones i thought about adding the exact temperature value to the text.
For more details check out my added screenshots.
I have coded the fucking thing down so if you want i can share it with the Project.
Send an intent on changes to the displayed texts so that we can use a Tasker "Received Intent" filter, to re-use the text in Tasker or maybe even forward it to a custom Zooper Widget.
Add a sharing button to share the weather condition with enemies.
Thanks to Ionescu Gabriel
The launcher can't resume the widget instance state when switching from Loading layout to normal layout, because they share the img_weathericon ID but on two different Views (ProgressBar and ImageView respectively) so there is some kind if casting exception.
Not high priority, everything still works on all test devices.
Let's just borrow Dashclock's code :D
Regression, was thought to be fixed but reappeared in v2.0.1. Happens on devices running Android 2.x.
java.lang.RuntimeException: Unable to start activity ComponentInfo{net.frakbot.FWeather/net.frakbot.FWeather.activity.LocationChooserDialog}: java.lang.IllegalStateException: You must use Theme.Sherlock, Theme.Sherlock.Light, Theme.Sherlock.Light.DarkActionBar, or a derivative.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1665)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1681)
at android.app.ActivityThread.access$1500(ActivityThread.java:118)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:933)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3701)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:875)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:633)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalStateException: You must use Theme.Sherlock, Theme.Sherlock.Light, Theme.Sherlock.Light.DarkActionBar, or a derivative.
at com.actionbarsherlock.internal.ActionBarSherlockCompat.generateLayout(ActionBarSherlockCompat.java:976)
at com.actionbarsherlock.internal.ActionBarSherlockCompat.installDecor(ActionBarSherlockCompat.java:902)
at com.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:836)
at com.actionbarsherlock.app.SherlockFragmentActivity.setContentView(SherlockFragmentActivity.java:262)
at net.frakbot.FWeather.activity.LocationChooserDialog.onCreate(LocationChooserDialog.java:52)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1613)
... 11 more
Just like in the other project ;)
Add a method that pseudo-randomly selects an insulting message for a certain event.
For example, when sunny, we can have:
08-23 21:02:21.194 W/ActivityManager(552): Permission Denial: Accessing service ComponentInfo{net.frakbot.FWeather/net.frakbot.FWeather.updater.UpdaterService} from pid=-1, uid=10085 that is not exported from uid 10066
To include:
Further customization will be added in later versions.
Already provided by Aaron Gerlach. Just need to insert it and test.
Weather info should be cached in order to retrieve it when network is down.
Add different sizes widgets (4x1, 3x2, ...) with smaller text to fit all the contents on platforms that don't support resizing, and optimize the main widget for smaller sizes
Register a connection listener when the connection is down (in checkNetwork
with a flag, maybe) so we can retry as soon as it becomes available again.
Show temperature and share+settings icon in a popup (user can opt-out of it?)
Add a opaque background with transparency settings, just like DashClock.
Users should be insulted when they have no location provider available at all on their f*****g device.
Add an option to enable sending notifications to the Pebble smartwatch.
I'll submit a PR when I've some free time. :)
Those fucking crappy devices have fuckingly small screens and insanely low display densities; text can't fit the space that launchers give to the widget, and thus we need to reduce text size by 20-30% on ldpi and mdpi phones in order to fit the motherfucking text in the shitty space.
The city name should be encoded, or the GET will fail.
Useful to check for when reading logcats sent by the users. Should be only active when in debug mode (to be added as a preference), see #15
It'd be nice to implement a DashClock extension, maybe with a popup with the full weather description in it.
It's already been requested by a user.
Elaborate.
Cannot instantiate fragments. User reported. This wouldn't happen if we had a Nexus 10 to test on.
java.lang.RuntimeException: Unable to start activity ComponentInfo{net.frakbot.FWeather/net.frakbot.FWeather.activity.SettingsActivity}: android.app.Fragment$InstantiationException: Unable to instantiate fragment net.frakbot.FWeather.activity.SettingsActivity$CustomizationPreferenceFragment: make sure class name exists, is public, and has an empty constructor that is public
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2110)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)
at android.app.ActivityThread.access$700(ActivityThread.java:140)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4921)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.app.Fragment$InstantiationException: Unable to instantiate fragment net.frakbot.FWeather.activity.SettingsActivity$CustomizationPreferenceFragment: make sure class name exists, is public, and has an empty constructor that is public
at android.app.Fragment.instantiate(Fragment.java:588)
at android.preference.PreferenceActivity.switchToHeaderInner(PreferenceActivity.java:1229)
at android.preference.PreferenceActivity.switchToHeader(PreferenceActivity.java:1262)
at android.preference.PreferenceActivity.onCreate(PreferenceActivity.java:637)
at net.frakbot.FWeather.activity.SettingsActivity.onCreate(SettingsActivity.java:79)
at android.app.Activity.performCreate(Activity.java:5188)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2074)
... 11 more
Caused by: java.lang.InstantiationException: can't instantiate class net.frakbot.FWeather.activity.SettingsActivity$CustomizationPreferenceFragment; no empty constructor
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1319)
at android.app.Fragment.instantiate(Fragment.java:577)
... 18 more
They can't be used anyway (the refresh Toast doesn't show, the SettingsScreen requires the user to unlock the device before being able to access it).
This requires an opt-out in the settings screen as well.
Useful for mdpi tablets and for people who like to do things.
No honestly, at 720x1280 the paragraph is on a single line and incredible hard to read even through the widget takes up 3x4 of the screen.
This is to adapt to various zones and climates
Add advanced settings for the widget appearance:
As of release-1.0, the app uses some simple location handling logic.
Switching to Google Play Services' Fused Location Provider should help get better positioning and save some battery as well.
This is to save data and power.
Stack trace:
java.lang.RuntimeException: Unable to start activity ComponentInfo{net.frakbot.FWeather/net.frakbot.FWeather.activity.SettingsActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2308)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2358)
at android.app.ActivityThread.access$600(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1247)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5227)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at net.frakbot.FWeather.activity.SettingsActivity.bindPreferenceSummaryToValue(SettingsActivity.java:484)
at net.frakbot.FWeather.fragments.CustomizationPreferencesFragment.onCreate(CustomizationPreferencesFragment.java:38)
at android.app.Fragment.performCreate(Fragment.java:1673)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:854)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1057)
at android.app.BackStackRecord.run(BackStackRecord.java:682)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1435)
at android.app.Activity.performStart(Activity.java:5113)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2271)
... 11 more
Hi, a setting panel will be welcome.
The action icons (refresh and settings) go beyond the text when the weather icon is disabled.
A setting could be added to choose a default location to use when there is no geolocation data available, and to disable geolocation.
Thanks to jangers from xda-developers!
When the JSON is malformed, there could be a NullPointerException
:
java.lang.NullPointerException
at org.json.JSONTokener.nextCleanInternal(JSONTokener.java:116)
at org.json.JSONTokener.nextValue(JSONTokener.java:94)
at org.json.JSONObject.<init>(JSONObject.java:154)
at org.json.JSONObject.<init>(JSONObject.java:171)
at net.frakbot.FWeather.JSONWeatherParser.getWeather(JSONWeatherParser.java:42)
at net.frakbot.FWeather.UpdaterService.getWeather(UpdaterService.java:348)
at net.frakbot.FWeather.UpdaterService.onHandleIntent(UpdaterService.java:70)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:213)
at android.os.HandlerThread.run(HandlerThread.java:60)
This is a really rare condition, but should be fixed anyway.
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.