Any help or suggestions?

On Jul 28, 6:28 pm, Subba <raochoud...@gmail.com> wrote:
> Application haswidgetwhich basically shows the number of new message
> count in thewidget.Widgethas title and Count.When application gets
> updated,widgettitle gets replaced with message count, and some times
> it shows problem loadingwidget. seems like R value not updated after
> app update. However user removes the application or reboot the 
> phonewidgeticon shows properly. Is there any way to fix the issue?
>
> Any suggestions.Here is the sample code
>
>  public void onReceive(Context context, Intent intent) {
>
>                 String action = intent.getAction();
>
>                 if( AppWidgetManager.ACTION_APPWIDGET_UPDATE.equals(action) ) 
> {
>                     int layoutID = R.layout.WidgetLayout;
>                     int[] ids =
> intent.getIntArrayExtra( AppWidgetManager.EXTRA_APPWIDGET_IDS );
>
>                     for (int i=0; i<ids.length; i++)
>                     {
>                        int appWidgetId = ids[i];
>
>                        RemoteViews views = new 
> RemoteViews(context.getPackageName(),
> layoutID );
>                        updateMessageCount(count);
>                        AppWidgetManager manager =
> AppWidgetManager.getInstance( context );
>                        manager.updateAppWidget(appWidgetId, views);
>                     }
>
>                }
>         }

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to