Do you have a widget configurator activity? if so the first onUpdate() is
not going to get called but subsequent onUpdates() will.

Also if you were to overload "onReceive()" make sure you call the parent
"onReceive()" otherwise you are disabling yourself from calling the rest of
the widget callbacks.

Good luck with your debugging

Satya

On Fri, Dec 30, 2011 at 12:31 PM, Eyal T <elt...@gmail.com> wrote:

> Hi all
>
> I try create a clickable widget.
> I saw that the clickable notification is not configured because
> onUpdate function is never being called (so I cannot set the
> notification)
> * I did not saw the log in the LogCat so I assume that the function is
> never being called
> * The Log in the onRecieve is being execute when I add the widget to
> the screen, and once in 30 minutes.
>
>
> Can anyone help me?
>
> Thanks Eyal
>
>
> public class AnimationWidget extends AppWidgetProvider {
>    public static int imageNumber = 0;
>    private static final String ACTION_WIDGET_RECEIVER =
> "ActionRecieverWidget";
>
>
>
>
>       /** Called when the activity is first created. */
>
>
>
>       @Override
>       public void onUpdate(Context context, AppWidgetManager
> appWidgetManager,
>                     int[] appWidgetIds) {
>
>              Log.i("print from main", "widget id: ");
>
> }
>
> @Override
>        public void onReceive(Context context, Intent intent) {
>
>
>               Log.i("print from main", "onReceive " +
> intent.getAction());
> }
>
> <manifest xmlns:android="http://schemas.android.com/apk/res/android";
>      package="com.animation.widget"
>      android:versionCode="1"
>      android:versionName="1.0">
>    <uses-sdk android:minSdkVersion="7" android:targetSdkVersion="7"/>
>
>       <!-- Broadcast Receiver that will process AppWidget updates -->
>    <application android:icon="@drawable/pic" android:label="@string/
> app_name">
>       <receiver android:name=".AnimationWidget"
> android:label="@string/app_name">
>                     <intent-filter>
>                     <action
> android:name="android.appwidget.action.APPWIDGET_UPDATE" />
>              </intent-filter>
>                     <meta-data
> android:name="android.appwidget.provider"
>                  android:resource="@xml/widget_info" />
>       </receiver>
>           <service android:name=".AnimationWidget$UpdateService" />
>
>
>
>       </application>
>
>    <uses-permission android:name="android.permission.INTERNET" />
>    <uses-permission android:name="android.permission.WAKE_LOCK" />
> </manifest>
>
> --
> 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




-- 
Satya Komatineni
http://www.satyakomatineni.com
http://www.androidbook.com

-- 
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