Get rid of the Handler from the app widget. BroadcastReceivers cannot
reliably use things that will continue after onReceive() (or, in the
case of an AppWidgetProvider, onUpdate()).

On Mon, Jul 11, 2011 at 11:40 AM, GuiZ <[email protected]> wrote:
> Hi everyone,
> i have a problem to stop and handler (i try also a timer i have the
> same problem) that i call in a widget. I try to remove callbacks but
> the hander doesn't stop.
>
> Make handler
>
> private Handler handler = new Handler();
>
>    private Runnable runnable = new Runnable() {
>        @Override
>        public void run() {
>                RunEdt();
>                handler.postDelayed(this, 10000);
>
>        }
>     };
>
>
> Update start
>
> handler.postDelayed(runnable, 100);
>
>
> I try to stop it ondeleted
>
>        public void onDeleted(Context context, int[] appWidgetIds) {
>                handler.removeCallbacks(runnable);
>        }
>
>
> Any ideas?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" 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-developers?hl=en
>



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_Android Programming Tutorials_ Version 3.5 Available!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en

Reply via email to