本文整理了Java中android.app.IntentService.onTaskRemoved()
方法的一些代码示例,展示了IntentService.onTaskRemoved()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。IntentService.onTaskRemoved()
方法的具体详情如下:
包路径:android.app.IntentService
类名称:IntentService
方法名:onTaskRemoved
暂无
代码示例来源:origin: cemrich/zapp
@Override
public void onTaskRemoved(Intent rootIntent) {
super.onTaskRemoved(rootIntent);
onDestroy();
}
代码示例来源:origin: NordicSemiconductor/Android-DFU-Library
@Override
public void onTaskRemoved(final Intent rootIntent) {
super.onTaskRemoved(rootIntent);
// This method is called when user removed the app from Recents.
// By default, the service will be killed and recreated immediately after that,
// but we don't want it. User removed the task, so let's cancel DFU.
final NotificationManager manager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
manager.cancel(NOTIFICATION_ID);
stopSelf();
}
内容来源于网络,如有侵权,请联系作者删除!