package com.apptentive.android.demo;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import com.apptentive.android.sdk.Apptentive;

import java.util.HashMap;

public class DemoActivity extends Activity {
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		Log.e("DEMO", "onCreate()");
		setContentView(R.layout.main);

		final Apptentive apptentive = Apptentive.initialize(this, "Demo Activity", "<YOUR_API_KEY>", 5, 10, 5, 4);

		// Add custom data fields to feedback this way:
		HashMap<String, String> customFeedbackFields = new HashMap<String, String>();
		customFeedbackFields.put("aqua_pet_version", "1.0.2");
		customFeedbackFields.put("aqua_pet_id", "0123456789ABCDEF");
		apptentive.addFeedbackDataFields(customFeedbackFields);

		Button resetButton = (Button) findViewById(R.id.button_reset);
		resetButton.setOnClickListener(new View.OnClickListener() {
			public void onClick(View view) {
				apptentive.reset();
			}
		});
		Button eventButton = (Button) findViewById(R.id.button_event);
		eventButton.setOnClickListener(new View.OnClickListener() {
			public void onClick(View view) {
				apptentive.event();
			}
		});
		Button dayButton = (Button) findViewById(R.id.button_day);
		dayButton.setOnClickListener(new View.OnClickListener() {
			public void onClick(View view) {
				apptentive.day();
			}
		});
		Button choiceButton = (Button) findViewById(R.id.button_choice);
		choiceButton.setOnClickListener(new View.OnClickListener() {
			public void onClick(View view) {
				apptentive.choice(DemoActivity.this);
			}
		});
		Button ratingsButton = (Button) findViewById(R.id.button_ratings);
		ratingsButton.setOnClickListener(new View.OnClickListener() {
			public void onClick(View view) {
				apptentive.rating(DemoActivity.this);
			}
		});
		Button feedbackButton = (Button) findViewById(R.id.button_feedback);
		feedbackButton.setOnClickListener(new View.OnClickListener() {
			public void onClick(View view) {
				apptentive.feedback(DemoActivity.this, true);
			}
		});
		Button surveyButton = (Button) findViewById(R.id.button_survey);
		surveyButton.setOnClickListener(new View.OnClickListener() {
			public void onClick(View view) {
				apptentive.survey(DemoActivity.this);
			}
		});
	}

	@Override
	protected void onResume() {
		super.onResume();
		Log.e("DEMO", "onResume()");
		Apptentive.getInstance().runIfNeeded(DemoActivity.this);
	}

	@Override
	protected void onDestroy() {
		Log.e("DEMO", "onDestroy()");
		super.onDestroy();
	}
}

@@ -622,16 +622,18 @@
 way:%0D%0A%09%09
+//
 HashMap%3C
@@ -701,24 +701,26 @@
 ring%3E();%0D%0A%09%09
+//
 customFeedba
@@ -737,104 +737,27 @@
 ut(%22
-aqua_pet_version%22, %221.0.2%22);%0D%0A%09%09customFeedbackFields.put(%22aqua_pet_id%22, %220123456789ABCDEF
+foo%22, %22bar
 %22);%0D%0A%09%09
+//
 appt

Remove extra code.