Guest chall32 Posted July 19, 2010 Report Posted July 19, 2010 (edited) I love this widget, but recently (for me at least), it's problem with weather updates has got worse and worse. And thats just annoying :D As we know, the developer Android Does has been served a cease and desist from HTC (booo! :angry: ). So it looks like we are on our own with any issues - at least until the developer release's a new "HTC compliant" widget. Looking through the v1.3.0 comments on Android Does, I see that the widget is using Google Weather API to obtain it's base weather info. This is confirmed by looking at logcat output whilst performing a manual weather refresh; the following can be seen: 1777 GoogleWeather D http://www.google.com/ig/api?hl=en_US&weather=Ashford%2C+Kent Using firefox to to hit that URL (check the source code of resulting page), I discovered that there was no weather info being returned. Just the following blank data: <?xml version="1.0"?><xml_api_reply version="1"><weather module_id="0" tab_id="0" mobile_row="0" mobile_zipped="1" row="0" section="0" ><problem_cause data=""/></weather></xml_api_reply> Dropping the "%2C+Kent" from the URL, we receive valid data: <?xml version="1.0"?> <xml_api_reply version="1"> <weather module_id="0" tab_id="0" mobile_row="0" mobile_zipped="1" row="0" section="0" > <forecast_information><city data="Ashford, Kent"/> <postal_code data="Ashford"/> <latitude_e6 data=""/> <longitude_e6 data=""/> <forecast_date data="2010-07-19"/><current_date_time data="2010-07-19 21:50:00 +0000"/> <unit_system data="US"/> </forecast_information> <current_conditions> <condition data="Clear"/><temp_f data="72"/> <temp_c data="22"/> <humidity data="Humidity: 53%"/> <icon data="/ig/images/weather/sunny.gif"/> <wind_condition data="Wind: SW at 5 mph"/> </current_conditions>yadda yadda So, it looks like the google api has stopped replying to queries using fully qualified city data (In my case <city data="Ashford, Kent"/>), but as we have seen above, if we drop the city data suffix ", Kent" from the query all is good. This is confirmed by testing with single place names - Eg "London" or "Kent" or "Sussex" etc etc - anywhere that doesn't need qualifying with a coma and a county after it. It turns out that the fix is easy, no apk hacking required (not that I condone that kind of thing). Fancy Widget stores it's preference data in the file: /data/data/com.fancywidget.android/shared_prefs/com.fancywidget.android_preferences.xml So a quick tweak in the file: <?xml version='1.0' encoding='utf-8' standalone='yes' ?> <map> <long name="prefs_last_refresh" value="1279575601399" /> <string name="prefs_refresh_interval">3</string> <string name="prefs_alt_location">Ashford</string> <float name="prefs_alt_latitude" value="0.0" /> <string name="prefs_clock_tap">0</string> <boolean name="prefs_auto_refresh" value="true" /> <string name="prefs_date_tap">0</string> <boolean name="prefs_use_my_location" value="false" /> <boolean name="prefs_use_24hr" value="true" /> <string name="prefs_alt_postal">Ashford</string> <float name="prefs_alt_longitude" value="0.0" /> <long name="prefs_next_refresh" value="0" /> <string name="prefs_weather_tap">0</string> <boolean name="prefs_use_celsius" value="true" /> </map> And all is fixed! The widget updates and checking via logcat, the query now looks like: 1781 GoogleWeather D http://www.google.com/ig/api?hl=en_US&weather=Ashford ;) Nice. No more annoyance and an properly updating widget once again! - Chris Edited July 19, 2010 by chall32
Guest Simon O Posted July 19, 2010 Report Posted July 19, 2010 That;s strange because I get updates fine: <xml_api_reply version="1"><weather module_id="0" tab_id="0" mobile_row="0" mobile_zipped="1" row="0" section="0" ><forecast_information><city data="Nottingham, Nottinghamshire"/><postal_code data="Nottingham, United Kingdom"/><latitude_e6 data=""/><longitude_e6 data=""/><forecast_date data="2010-07-19"/><current_date_time data="2010-07-19 22:20:00 +0000"/><unit_system data="US"/></forecast_information><current_conditions><condition data="Rain"/><temp_f data="66"/><temp_c data="19"/><humidity data="Humidity: 64%"/><icon data="/ig/images/weather/rain.gif"/><wind_condition data="Wind: S at 10 mph"/></current_conditions><forecast_conditions><day_of_week data="Mon"/><low data="59"/><high data="78"/><icon data="/ig/images/weather/mostly_sunny.gif"/><condition data="Mostly Sunny"/></forecast_conditions><forecast_conditions><day_of_week data="Tue"/><low data="57"/><high data="68"/><icon data="/ig/images/weather/rain.gif"/><condition data="Rain"/></forecast_conditions><forecast_conditions><day_of_week data="Wed"/><low data="53"/><high data="69"/><icon data="/ig/images/weather/chance_of_rain.gif"/><condition data="Chance of Rain"/></forecast_conditions><forecast_conditions><day_of_week data="Thu"/><low data="51"/><high data="68"/><icon data="/ig/images/weather/sunny.gif"/><condition data="Clear"/></forecast_conditions></weather></xml_api_reply>
Guest chall32 Posted July 19, 2010 Report Posted July 19, 2010 Hmm In that case there must be something funny going on with the google weather api. Looks like its not consistant across locations.
Guest Azurren Posted July 20, 2010 Report Posted July 20, 2010 Hmm In that case there must be something funny going on with the google weather api. Looks like its not consistant across locations. Sometimes I do sometimes I don't get updates. Depends on where I go :angry: Sadly this fix won't help me as it only messes up in certain areas not in my home location :D
Guest chall32 Posted July 20, 2010 Report Posted July 20, 2010 Sometimes I do sometimes I don't get updates. Depends on where I go :angry: Sadly this fix won't help me as it only messes up in certain areas not in my home location :D OK. :D I guess I must live in one of those "certain problem areas" ;) Anyway, for me at least, with the fix above Fancy Widget is again finally firing on all cylinders. mmm nice.
Guest brooksie Posted July 28, 2010 Report Posted July 28, 2010 where do i find the file "/data/data/com.fancywidget.android/shared_prefs/com.fancywidget.android_preferences.xml" im sort of a newb so please help me out :(
Guest BigBearMDC Posted July 28, 2010 Report Posted July 28, 2010 where do i find the file "/data/data/com.fancywidget.android/shared_prefs/com.fancywidget.android_preferences.xml" im sort of a newb so please help me out :( What? You already said it... in /data/data/com.fancywidget.android/shared_prefs/ :P Run adb shell mount -o rw /dev/block/mtdblock2 /data exit adb pull /data/data/com.fancywidget.android/shared_prefs/com.fancywidget.android_preferences.xml "X:\some-folder\com.fancywidget.android_preferences.xml"[/code] Job done :( Best regards, BB
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now