"What if? Why not? Challenge the Convention! Let's do some incredible things!" More Quotes
Home
About/Contact
Twitter
Aspire/J2EE
Github
Pro Android 4
Our Android Books
Lookup Meaning
look up
more ..
Stuff I used to do
java.net Blog
At O'Reilly
Articles
Humanities
Humanities Current
Humanities 2007
Telugu related
Shells
Books
Music
Letters
Recipes
Jax Restaurants
Java
J2SE/J2EE/JSP
Portlets
Research
OSCON 2004
Download OSCON 2004 Presentation
OSCON 2003
Magazines
Dotnet
FTP
Industries
Supply Chain
Health
26-Apr-11
As you start working with widgets, you will quickly realize that they are stateless. Every call back to paint the widget is invoked and the process dismantled (unless you take reasonable steps to keep this process alive, if that were to be needed). There is no explicit or direct mechanism to ask the widget: "Hey, what did I paint you with the last time around?". This is essentially a valid question if the widget were to have a state. Such a state is typically (indirectly) maintained using a persistence mechansim such as files, shared preferences, SQLLite, or the internet itself.
This item has some example **drafty** source code to illustrate this.
app widget code snippets
10-Dec-11
BDayWidget code snippets
See the document for: Android Home widgets Research Notes
13-Dec-11
Honeycomb home screen widgets
14-Dec-11
How are RemoteViews used for Android Widgets
15-Dec-11
Latest available remote views
Briefly, here is the core idea of how home screen widgets work (knowing this should make the rest of this section a bit easier to follow). An AppWidgetProvider is a broadcast receiver that gets invoked every once in a while based on a timer interval that you specify in a configuration file. This AppWidgetProvider then loads a RemoteViews instance based on a layout file. This RemoteViews object is then passed to the AppWidgetManager to be displayed on the home screen.
Optionally, you can tell Android that you have an activity that needs to be invoked before placing the widget for the first time on the home screen. This allows the configuration activity to set initialization parameters for the widget.
You also can set up onClick events on the remote views of the widget so that intents can get fired based on those events. These intents then can invoke whatever components necessary, including sending messages to the AppWidgetProvider broadcast receiver.
At a high level, this is all there is to home screen widgets. The rest is the mechanics and variations on each of these basic ideas.
Understand homescreen widgets
what are homescreen widgets?
whats new in honeycomb/ics widgets
My Widget Notes
1. My Research on widgets
2. Honeycomb List Widgets
3. Widget Code Snippets
4. Managing State
5. RemoteViews
6. Pleasing layouts
Widgets/API
1. main doc on widgets
2. AppWidgetProviderInfo XML
3. AppWidgetProvider API
4. AppWidgetManager API
5. Widget Design
6. Remote Views API
7. AppWidgetProviderInfo
8. Shared Preferences
9. Saving Shared Preferences
10.RemoteViewsService
11.RemoteViewsFactory
More docs on
Widgets
Android
4.0/ICS changes
Highlevel changes
API changes
Known issues
4.0 Users Guide??
Android SDK Essentials
Devices
3.0 user guide
2.3 user guide
2.2 user guide
2.3 Release Notes
1. home page
2. Guide
2.1 Articles
3. api
4. manifest
4.1 tasks
5. Samples
6. Blogs
7. features
9. source
9.1 git source
11. Google IO
13. Git
14. Java notes
15. tools
Samples
1. Projects for 2.0 book
2. Code
3. Projects for 3.0
5. Android 1.0
Page Menu
Print
Sort by Date
Sort by Name
Titles
> Summaries
Global Menu
My Web Logs
My Library
My Home
Other libraries
Author Content
data format