本文整理汇总了Java中org.eyeseetea.malariacare.network.SurveyChecker类的典型用法代码示例。如果您正苦于以下问题:Java SurveyChecker类的具体用法?Java SurveyChecker怎么用?Java SurveyChecker使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SurveyChecker类属于org.eyeseetea.malariacare.network包,在下文中一共展示了SurveyChecker类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: pushAllPendingSurveys
import org.eyeseetea.malariacare.network.SurveyChecker; //导入依赖的package包/类
/**
* Push all pending surveys
*/
private void pushAllPendingSurveys() {
Log.d(TAG, "pushAllPendingSurveys (Thread:" + Thread.currentThread().getId() + ")");
if (!AUtils.isNetworkAvailable() || PreferencesState.getInstance().isPushInProgress()) {
Log.d(TAG, "Cancel push, push in progress or not network");
return;
}
PushController.changePushInProgress(true);
Log.d(TAG, "Start push");
SurveyChecker.launchQuarantineChecker();
//Select surveys from sql
List<Survey> surveys = Survey.getAllCompletedSurveys();
//No surveys -> done
if(surveys==null || surveys.isEmpty()){
Log.d(TAG, "Not push. 0 surveys with complete as status");
PushController.changePushInProgress(false);
return;
}
//All pending surveys are sent at once
PushClient pushClient = getPushClient(surveys);
pushClient.pushSDK();
}