uploadPhoto を指定して、このコードの UI スレッドで ProgressDialog を取得する方法を理解するのに本当に苦労しており、ガイダンスをいただければ幸いです。
@Override
/** Handle Upload a Photo **/
protected void onActivityResult(int requestCode, int resultCode, Intent imageReturnedIntent) {
super.onActivityResult(requestCode, resultCode, imageReturnedIntent);
// Get image
if (resultCode == RESULT_OK) {
// ProgressDialog dialog = ProgressDialog.show(this, "", "Uploading Photo...", true, false);
switch(requestCode) {
// Take Photo
case 4001:
// Upload
uploadPhoto(Uri.fromFile(mImageFile));
break;
// Select Photo
case 5001:
// Get image
Uri selectedImage = imageReturnedIntent.getData();
// Upload
uploadPhoto(selectedImage);
break;
}
// Dismiss
// dialog.dismiss();
}
}