I am trying to add AppWidget into my application, but it seems like android developer team provided required classes while restricting usage of them (as always with lack of documentation). Seems like the only way i found (in order to acquire fully functional AppWidget object) is using AppWidgetManager.ACTION_APPWIDGET_PICK activity, which is provided by android. Any idea about how to bypass AppWidgetManager.ACTION_APPWIDGET_PICK?
If any android developer team member read this, please add information about to javadoc, or just throw some exception in usage (maybe using exception not appropriate, because AppWidgets still working with UI, without handling touch/click events)… I spend my whole month on it… Just please, android have serious issues about documentation which makes them weak against IOS.
If anyone curious about source code to acquire half-functional AppWidget, here is my previous question.
Thanks in advance…
Android documentation victim 🙂
AppWidgets system in android works in following way:
AppWidgetHost.allocateAppWidgetId
particular widget he wants via PICK_APPWIDGET intent and system
binds you id to this widget AppWidgetInfo
provided by system to create AppWidgetHostView
So to bypass PICK_APPWIDGET intent you need to bind appWidgetId to appWidgetInfo by yourself
unfortunatly whit requires BIND_APPWIDGET permission which is only avalible to system.
Hope it helps.