当我退出我的应用程序时,我想启动服务。
代码是:
Intent i_service = new Intent(MainActivity.this,check.class);
startService(i_service);
当我重新打开我的应用程序时,我想停止我在退出应用程序时启动的服务。
代码是:
Intent i_service = new Intent(MainActivity.this,check.class);
stopService(i_service);
这是正确的做法吗?
如何停止我的旧服务?
提前致谢