本文整理汇总了Java中com.firebase.jobdispatcher.JobParameters.getTag方法的典型用法代码示例。如果您正苦于以下问题:Java JobParameters.getTag方法的具体用法?Java JobParameters.getTag怎么用?Java JobParameters.getTag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.firebase.jobdispatcher.JobParameters
的用法示例。
在下文中一共展示了JobParameters.getTag方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onStartJob
import com.firebase.jobdispatcher.JobParameters; //导入方法依赖的package包/类
@Override
public boolean onStartJob(JobParameters params) {
Log.inform("Sync Job request received");
dispatcher = new FirebaseJobDispatcher(new GooglePlayDriver(getBaseContext()));
switch (params.getTag()) {
case RESET_ALL_JOBS:
resetAllJobs();
break;
case SYNC_PREFERENCES:
syncPreferences();
break;
case SYNC_ROUTE_DATA:
syncRouteData();
break;
case SINGLE_ROUTE_SYNC:
syncRouteData();
break;
}
return false;
}
示例2: onStartJob
import com.firebase.jobdispatcher.JobParameters; //导入方法依赖的package包/类
@Override
public boolean onStartJob(JobParameters job) {
switch (job.getTag()){
case SyncServerHelper.SEND_SYNC_TAG:
SyncServerService.startSendSyncObj(this);
break;
case SyncServerHelper.SYNC_TAG:
SyncServerService.startSync(this);
}
return false;
}
示例3: onStartJob
import com.firebase.jobdispatcher.JobParameters; //导入方法依赖的package包/类
@Override public boolean onStartJob(JobParameters jobParameters) {
Log.d(LOG_TAG, "onStartJob() called with: jobParameters = [" + jobParameters + "]");
Bundle jobBundle = jobParameters.getExtras();
if (jobBundle != null) {
reactNativeEventStarter.trigger(jobBundle);
} else {
throw new RuntimeException("No job parameters provided for job:" + jobParameters.getTag());
}
return false; // No more work going on in this service
}