Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/213.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 棒棒糖下如何应用工作日程_Android - Fatal编程技术网

Android 棒棒糖下如何应用工作日程

Android 棒棒糖下如何应用工作日程,android,Android,我创建了一个作业调度服务 public class JobSchedularService extends JobService { //called when instance is created. @Override public void onCreate() { super.onCreate(); Log.e("jobservice","oncreate called"); } //called when se

我创建了一个作业调度服务

public class JobSchedularService extends JobService {

    //called when instance is created.
    @Override
    public void onCreate() {
        super.onCreate();
        Log.e("jobservice","oncreate called");
    }

    //called when service instance is destroyed.
    @Override
    public void onDestroy() {
        super.onDestroy();
        Log.e("jobservice","ondestroy called");
    }

    @Override
    public boolean onStartJob(JobParameters jobParameters) {
        Log.e("job start"," called");
        return true;
    }

    @Override
    public boolean onStopJob(JobParameters jobParameters) {
        Log.e("job stop","called");
        return false;
    }
}
并使用jobschedular来调度作业。
但它只适用于API21以上的版本,那么什么可以应用于API21以下的版本呢?

改用它,它允许您在API21及以上的版本上调度任务和使用作业调度程序。

改用它,它允许您在API21及以上的版本上调度任务和使用作业调度程序。

GCM不受欢迎,您是否意识到?GCM不受欢迎,你意识到了吗?