在android中停止后台运行多个计时器
我在活动的不同时间启动了一些计时器。每个计时器都有自己的到期日。但我想在特定情况发生时停止后台运行的所有计时器在android中停止后台运行多个计时器,android,multithreading,Android,Multithreading,我在活动的不同时间启动了一些计时器。每个计时器都有自己的到期日。但我想在特定情况发生时停止后台运行的所有计时器 如何停止Android中后台运行的多个计时器?您可以轻松取消计时器。 检查下面的代码 private static Timer abc_Timer; abc_Timer=new Timer(); /*`your logic`*/ abc_Timer.cancel(); //cancel method will cancel your timer //After use of cance
如何停止Android中后台运行的多个计时器?您可以轻松取消计时器。 检查下面的代码
private static Timer abc_Timer;
abc_Timer=new Timer();
/*`your logic`*/
abc_Timer.cancel(); //cancel method will cancel your timer
//After use of cancel method use
abc_timer.purge(); //this method will remove all cancelled timer.
你怎么启动计时器?有他们的参考资料和电话吗?