如何从api级别16到api级别28在Android应用程序的后台服务中运行和实现24/7通知侦听器

时间:2018-11-02 16:48:11

标签: android android-service android-notifications

我正在尝试实施长期运行的android服务,无论应用程序是否运行,该服务都会一直运行。当我在Android Pie Verson中关闭应用程序时,此服务将被终止

以下是我的服务代码:

job_ids_featureless_power = jt %>% filter(algorithm == "regr.featureless", problem == "Power") %>% pull(job.id)
res_featureless_power = res[job.id %in% job_ids_featureless_power]
pred_featureless_power = lapply(res_featureless_power$result, FUN = function(x) x$pred.test) %>% data.frame() %>% t() %>% data.frame()
#Error in (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE,  : 
#arguments imply differing number of rows: 293, 292

我希望这项服务能够长期运行

0 个答案:

没有答案