Skip to content

Instantly share code, notes, and snippets.

@px-amaac
Created November 30, 2015 18:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save px-amaac/4265eda910fd152a3cd7 to your computer and use it in GitHub Desktop.
Save px-amaac/4265eda910fd152a3cd7 to your computer and use it in GitHub Desktop.
@Override
protected void onHandleIntent(Intent intent) {
sendImageUploadingIntent();
mTimesetPhoto = intent.getParcelableExtra(TIMESET_PHOTO);
if (mTimesetPhoto.getAddress() == null || mTimesetPhoto.getAddress() == "") {
sendImageFailedUploadingIntent();
} else {
try {
selectedCategoryItems = intent.getParcelableArrayListExtra(SELECTED_CATEGORIES);
uploadImage(mTimesetPhoto, selectedCategoryItems);
} catch (Exception e) {
e.printStackTrace();
sendImageFailedUploadingIntent();
}
}
}
private void uploadImage(TimesetPhoto mTimesetPhoto, List<CategoryItem> selectedCategoryItems) {
//TODO: Category items are not added to the photo upload at this time
// removing this check until fixed
if (mTimesetPhoto != null /*&& selectedCategoryItems != null*/) {
rotateAndCompressPhoto();
postRawPhoto();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment