Tuesday, October 1, 2013

Simple Preferences, Updating, and Localization

Tonight I have been working on simple-prefs for the weather widget. All in all it is very straight forward. However, I am having problems with writing back to the prefs. Right now the widget allows a user to set the preferences and displays cities accordingly. In this case if a user changes a preferences for the current city and there already is a current city set, it overrides it. If the current city does not exists, it creates one. The trouble is that modifying the prefs in the code does not seem to work. I don't know if this is due to a mistake I made or whether simple prefs does not allow it. The simple-prefs web pages do not state whether they are read-only from the code. I'm going to work more on it and hopefully figure it out.

I have successfully implemented a timer that makes a call to update the weather every hour. It is simple, but works nicely.

I have also looked at how to do localization for static words. It doesn't seem too bad. I'll most likely start on that tomorrow as well.

No comments:

Post a Comment