我创建了一个jobchedular服务
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调用它来安排工作。 但它只适用于21以上,那么可以在api 21下面应用什么?