package com.lukekorth.httpebble;

import android.app.Activity;
import android.os.Bundle;

public class Httpebble extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
	}
}

@@ -46,24 +46,22 @@
 oid.app.
-Activity
+Dialog
 ;%0Aimport
@@ -79,16 +79,227 @@
 .Bundle;
+%0Aimport android.support.v4.app.DialogFragment;%0Aimport android.support.v4.app.FragmentActivity;%0A%0Aimport com.google.android.gms.common.ConnectionResult;%0Aimport com.google.android.gms.common.GooglePlayServicesUtil;
 %0A%0Apublic
@@ -323,16 +323,24 @@
 extends 
+Fragment
 Activity
@@ -481,11 +481,1412 @@
 ain);%0A%09%7D
+%0A%0A%09@Override%0A%09protected void onResume() %7B%0A%09%09// Check that Google Play services is available%0A%09%09int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);%0A%0A%09%09// If Google Play services is unavailable%0A%09%09if (ConnectionResult.SUCCESS != resultCode) %7B%0A%09%09%09// Get the error dialog from Google Play services%0A%09%09%09Dialog errorDialog = GooglePlayServicesUtil.getErrorDialog(resultCode, this, 0);%0A%0A%09%09%09// If Google Play services can provide an error dialog%0A%09%09%09if (errorDialog != null) %7B%0A%09%09%09%09// Create a new DialogFragment for the error dialog%0A%09%09%09%09ErrorDialogFragment errorFragment = new ErrorDialogFragment();%0A%0A%09%09%09%09// Set the dialog in the DialogFragment%0A%09%09%09%09errorFragment.setDialog(errorDialog);%0A%0A%09%09%09%09// Show the error dialog in the DialogFragment%0A%09%09%09%09errorFragment.show(getSupportFragmentManager(), %22Location Updates%22);%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D%0A%0A%09// Define a DialogFragment that displays the error dialog%0A%09public static class ErrorDialogFragment extends DialogFragment %7B%0A%0A%09%09// Global field to contain the error dialog%0A%09%09private Dialog mDialog;%0A%0A%09%09// Default constructor. Sets the dialog field to null%0A%09%09public ErrorDialogFragment() %7B%0A%09%09%09super();%0A%09%09%09mDialog = null;%0A%09%09%7D%0A%0A%09%09// Set the dialog to display%0A%09%09public void setDialog(Dialog dialog) %7B%0A%09%09%09mDialog = dialog;%0A%09%09%7D%0A%0A%09%09// Return a Dialog to the DialogFragment.%0A%09%09@Override%0A%09%09public Dialog onCreateDialog(Bundle savedInstanceState) %7B%0A%09%09%09return mDialog;%0A%09%09%7D%0A%09%7D
 %0A%7D%0A

Add check for Google Play services