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.
I am using timer in my application for the background process and the timer
Share
Declare your Timer as
public static Timer timer;and you will be able to access it in any Activity or class usingAcitivity_name.timer.cancel();Thanks…