jobservice

How to check JobService is running or not in android?

£可爱£侵袭症+ 提交于 2019-11-28 23:07:06
问题 I am using JobService in my project. It's working good. But sometimes service stopped. It is not restart again. So that I am trying to strat the JobService if not running. But I don't know how to check JobService is already running or not. Please let me any idea to how to check JobService is running or not. My Job service class: @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) public class JobService extends android.app.job.JobService { @Override public boolean onStartJob(JobParameters params

Custom JobIntentService onHandleWork not called

谁说胖子不能爱 提交于 2019-11-27 21:08:04
问题 I recently was updating an app that I work on to handle notifications from push using a JobIntentService instead of a regular IntentService because it seems like the correct way to handle this on pre-Lollipop devices as well as post. I am enqueueing work as such: enqueueWork(context, MyJobServiceExtension.class, JOB_ID, work); This is the manifest declaration: <service android:name="com.example.MyJobServiceExtension" android:permission="android.permission.BIND_JOB_SERVICE" android:exported=