AppWidget click issue
<p>Like many others I am having trouble with the inconsistent behaviour with AppWidget Click working after a reboot.</p>

<p>This works OK <em>until</em> I reboot and then whether it works simply seems a matter of luck. Sometimes it does, mostly it doesn't. In 2.1UPDATE-1 works OK, in 2.3.7 sometimes works.</p>

<p>Something as simple as (in onEnabled() but believe me it can be anywhere):</p>

<pre><code>...

PendingIntent pendingIntentForUpdate = PendingIntent.getBroadcast(context, 0, updateIntent, 0);
remoteViews.setOnClickPendingIntent(R.id.logoBtn, pendingIntentForUpdate);

appWidgetManager.updateAppWidget(thisWidget, remoteViews);
</code></pre>

<p>Will work before reboot, fails after reboot, even though logcat shows the onReceive method was called (I have this method purely to catch the intent).</p>

<p>The Appwidget callbacks are also inconsistent with the official docs, with the onUpdate methods being called twice on reboot and onEnabled being called after a reboot (although the docs specify only when the appwidget is created for the first time).</p>

<p>Are there any specific design guidelines for maintaining consistency after reboot in AppWidget design.</p>

<p>many thanks. </p>
