Android timer problem
I am using timer in my application for the background process and开发者_开发问答 the timer runs successfully. But the problem is that i have to stop timer when logout button is clicked , the logout button is in different Activity. i have used timer.cancel() but As the Both Activity different it does't work. so give some hint to stop timer.
Declare your Timer as public static Timer timer;
and you will be able to access it in any Activity or class using Acitivity_name.timer.cancel();
Thanks...
精彩评论