// Path: HOSMCollect/src/hosm/odk/collect/android/listeners/InstanceUploaderListener.java
// public interface InstanceUploaderListener {
//     void uploadingComplete(HashMap<String, String> result);
//     void progressUpdate(int progress, int total);
//     void authRequest(Uri url, HashMap<String, String> doneSoFar);
// }
// 
// Path: HOSMCollect/src/hosm/odk/collect/android/provider/InstanceProviderAPI.java
//     public static final class InstanceColumns implements BaseColumns {
//         // This class cannot be instantiated
//         private InstanceColumns() {}
//         
//         public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/instances");
//         public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.odk.instance";
//         public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.odk.instance";
// 
//         // These are the only things needed for an insert
//         public static final String DISPLAY_NAME = "displayName";
//         public static final String SUBMISSION_URI = "submissionUri";
//         public static final String INSTANCE_FILE_PATH = "instanceFilePath";
//         public static final String JR_FORM_ID = "jrFormId";
//         public static final String JR_VERSION = "jrVersion";
//         //public static final String FORM_ID = "formId";
//         
//         // these are generated for you (but you can insert something else if you want)
//         public static final String STATUS = "status";
//         public static final String CAN_EDIT_WHEN_COMPLETE = "canEditWhenComplete";
//         public static final String LAST_STATUS_CHANGE_DATE = "date";
//         public static final String DISPLAY_SUBTEXT = "displaySubtext";
//         //public static final String DISPLAY_SUB_SUBTEXT = "displaySubSubtext";
// 
// 
// //        public static final String DEFAULT_SORT_ORDER = "modified DESC";
// //        public static final String TITLE = "title";
// //        public static final String NOTE = "note";
// //        public static final String CREATED_DATE = "created";
// //        public static final String MODIFIED_DATE = "modified";
//     }


import hosm.odk.collect.android.application.Collect;
import hosm.odk.collect.android.listeners.InstanceUploaderListener;
import hosm.odk.collect.android.preferences.PreferencesActivity;
import hosm.odk.collect.android.provider.InstanceProviderAPI.InstanceColumns;
import hosm.odk.collect.android.tasks.GoogleMapsEngineAbstractUploader;
import hosm.odk.collect.android.tasks.GoogleMapsEngineTask;
import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Set;
import hosm.odk.collect.android.R;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.util.Log;
import com.google.android.gms.auth.GoogleAuthException;
import com.google.android.gms.auth.GooglePlayServicesAvailabilityException;
import com.google.android.gms.auth.UserRecoverableAuthException;
import com.google.android.gms.common.GooglePlayServicesUtil;
				}
			};
			mProgressDialog.setTitle(getString(R.string.uploading_data));
			mProgressDialog.setMessage(mAlertMsg);
			mProgressDialog.setIndeterminate(true);
			mProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
			mProgressDialog.setCancelable(false);
			mProgressDialog.setButton(getString(R.string.cancel),
					loadingButtonListener);
			return mProgressDialog;
		case GOOGLE_USER_DIALOG:
			AlertDialog.Builder gudBuilder = new AlertDialog.Builder(this);

			gudBuilder.setTitle(getString(R.string.no_google_account));
			gudBuilder.setMessage(getString(R.string.gme_set_account));
			gudBuilder.setPositiveButton(R.string.ok,
					new DialogInterface.OnClickListener() {
						@Override
						public void onClick(DialogInterface dialog, int which) {
							finish();
						}
					});
			gudBuilder.setCancelable(false);
			return gudBuilder.create();
		}
		return null;
	}

	@SuppressWarnings("deprecation")
	private void createAlertDialog(String message) {
// Path: HOSMCollect/src/hosm/odk/collect/android/listeners/InstanceUploaderListener.java
// public interface InstanceUploaderListener {
//     void uploadingComplete(HashMap<String, String> result);
//     void progressUpdate(int progress, int total);
//     void authRequest(Uri url, HashMap<String, String> doneSoFar);
// }
// 
// Path: HOSMCollect/src/hosm/odk/collect/android/provider/InstanceProviderAPI.java
//     public static final class InstanceColumns implements BaseColumns {
//         // This class cannot be instantiated
//         private InstanceColumns() {}
//         
//         public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/instances");
//         public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.odk.instance";
//         public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.odk.instance";
// 
//         // These are the only things needed for an insert
//         public static final String DISPLAY_NAME = "displayName";
//         public static final String SUBMISSION_URI = "submissionUri";
//         public static final String INSTANCE_FILE_PATH = "instanceFilePath";
//         public static final String JR_FORM_ID = "jrFormId";
//         public static final String JR_VERSION = "jrVersion";
//         //public static final String FORM_ID = "formId";
//         
//         // these are generated for you (but you can insert something else if you want)
//         public static final String STATUS = "status";
//         public static final String CAN_EDIT_WHEN_COMPLETE = "canEditWhenComplete";
//         public static final String LAST_STATUS_CHANGE_DATE = "date";
//         public static final String DISPLAY_SUBTEXT = "displaySubtext";
//         //public static final String DISPLAY_SUB_SUBTEXT = "displaySubSubtext";
// 
// 
// //        public static final String DEFAULT_SORT_ORDER = "modified DESC";
// //        public static final String TITLE = "title";
// //        public static final String NOTE = "note";
// //        public static final String CREATED_DATE = "created";
// //        public static final String MODIFIED_DATE = "modified";
//     }


// Path: HOSMCollect/src/hosm/odk/collect/android/activities/GoogleMapsEngineUploaderActivity.java
import hosm.odk.collect.android.application.Collect;
import hosm.odk.collect.android.listeners.InstanceUploaderListener;
import hosm.odk.collect.android.preferences.PreferencesActivity;
import hosm.odk.collect.android.provider.InstanceProviderAPI.InstanceColumns;
import hosm.odk.collect.android.tasks.GoogleMapsEngineAbstractUploader;
import hosm.odk.collect.android.tasks.GoogleMapsEngineTask;
import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Set;
import hosm.odk.collect.android.R;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.util.Log;
import com.google.android.gms.auth.GoogleAuthException;
import com.google.android.gms.auth.GooglePlayServicesAvailabilityException;
import com.google.android.gms.auth.UserRecoverableAuthException;
import com.google.android.gms.common.GooglePlayServicesUtil;

				}
			};
			mProgressDialog.setTitle(getString(R.string.uploading_data));
			mProgressDialog.setMessage(mAlertMsg);
			mProgressDialog.setIndeterminate(true);
			mProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
			mProgressDialog.setCancelable(false);
			mProgressDialog.setButton(getString(R.string.cancel),
					loadingButtonListener);
			return mProgressDialog;
		case GOOGLE_USER_DIALOG:
			AlertDialog.Builder gudBuilder = new AlertDialog.Builder(this);

			gudBuilder.setTitle(getString(R.string.no_google_account));
			gudBuilder.setMessage(getString(R.string.gme_set_account));
			gudBuilder.setPositiveButton(R.string.ok,
					new DialogInterface.OnClickListener() {
						@Override
						public void onClick(DialogInterface dialog, int which) {
							finish();
						}
					});
			gudBuilder.setCancelable(false);
			return gudBuilder.create();
		}
		return null;
	}

	@SuppressWarnings("deprecation")
	private void createAlertDialog(String message) {
		Collect.getInstance().getActivityLogger()