@Override
 protected void onHandleIntent(Intent intent) {
   if (list != null) {
     Log.w(LOG, "###### starting service, onHandleIntent");
     webCheckResult = WebCheck.checkNetworkAvailability(getApplicationContext());
     if (webCheckResult.isWifiConnected() || webCheckResult.isMobileConnected()) {
       Log.w(LOG, "####### starting thumb upload loop");
       controlThumbUploads();
     } else {
       Log.e(LOG, "----- no network available for upload, will try later!");
     }
   }
 }
 private void controlThumbUploads() {
   // Log.d(LOG,"*** controlThumbUploads, index: " + index + " list: " + list.size());
   if (index < list.size()) {
     if (list.get(index).getDateThumbUploaded() == null) {
       executeThumbUpload(list.get(index));
     } else {
       index++;
       controlThumbUploads();
     }
   }
   if (index == list.size()) {
     // webCheckResult = WebCheck.checkNetworkAvailability(getApplicationContext());
     if (webCheckResult.isWifiConnected()) {
       index = 0;
       controlFullPictureUploads();
     }
   }
 }