hi all together,

i have a serious problem, my head is close to bursting and there is no
light at the end of the tunnel. How do i declare variables globally?

This simple code fails at Line 20 (Log.d(TAG, this.timer);):

public class HelloWidget extends AppWidgetProvider {
        private static final String TAG = "HelloWidget";
        public String timer;

        public void onUpdate(Context context, AppWidgetManager
appWidgetManager, int[] appWidgetIds) {
                Log.d(TAG, "onUpdate");
                this.timer = "yeahh";
        }

        public void onDeleted(Context context, int[] appWidgetIds) {
                Log.d(TAG, "onDeleted");
                Log.d(TAG, this.timer);
        }

}

At thise line 20 timer is null even though it was sucessuflly defined
as "yeahh" when the onUpdate() was called... where is that error?

Thanks a lot!

desperately,
Jonas

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to