package com.growthbeat.growthbeatsample;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.CheckBox;
import android.widget.EditText;

import com.growthbeat.Growthbeat;
import com.growthpush.GrowthPush;
import com.growthbeat.analytics.GrowthAnalytics;
import com.growthbeat.link.GrowthLink;

public class MainActivity extends Activity {

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

		Growthbeat.getInstance().initialize(this, "P5C3vzoLOEijnlVj", "btFlFAitBJ1CBdL3IR3ROnhLYbeqmLlY", BuildConfig.DEBUG);
		GrowthPush.getInstance().requestRegistrationId("955057365401");
		GrowthLink.getInstance().initialize(this, "P5C3vzoLOEijnlVj", "btFlFAitBJ1CBdL3IR3ROnhLYbeqmLlY");
		GrowthLink.getInstance().handleOpenUrl(getIntent().getData());
	
		findViewById(R.id.random_tag_button).setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				GrowthAnalytics.getInstance().setRandom();
			}
		});

		findViewById(R.id.development_tag_check_box).setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				CheckBox checkBox = (CheckBox) v;
				GrowthAnalytics.getInstance().setDevelopment(checkBox.isChecked());
			}
		});

		findViewById(R.id.level_tag_button).setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				try {
					EditText editText = (EditText) findViewById(R.id.level_edit_text);
					GrowthAnalytics.getInstance().setLevel(Integer.valueOf(editText.getText().toString()));
				} catch (NumberFormatException e) {
					Log.w("Grwothbeat Sample", "Input value error :" + e.getMessage());
				}
			}
		});

		findViewById(R.id.purchase_event_button).setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				try {
					EditText priceEditText = (EditText) findViewById(R.id.price_edit_text);
					EditText productEditText = (EditText) findViewById(R.id.product_edit_text);
					GrowthAnalytics.getInstance().purchase(Integer.valueOf(priceEditText.getText().toString()), "item",
							productEditText.getText().toString());
				} catch (NumberFormatException e) {
					Log.w("Grwothbeat Sample", "Input value error :" + e.getMessage());
				}
			}
		});

	}

	@Override
	public void onStart() {
		super.onStart();
		Growthbeat.getInstance().start();
	}

	@Override
	public void onStop() {
		super.onStop();
		Growthbeat.getInstance().stop();
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

}

@@ -312,42 +312,8 @@
 at;%0A
-import com.growthpush.GrowthPush;%0A
 impo
@@ -395,16 +395,50 @@
 wthLink;
+%0Aimport com.growthpush.GrowthPush;
 %0A%0Apublic
@@ -673,59 +673,59 @@
 , %22P
-5C3vzoLOEijnlVj%22, %22btFlFAitBJ1CBdL3IR3ROnhLYbeqmLlY
+IaD6TaVt7wvKwao%22, %22FD2w93wXcWlb68ILOObsKz5P3af9oVMo
 %22, B
@@ -751,20 +751,20 @@
 %09%09Growth
-Push
+Link
 .getInst
@@ -774,43 +774,78 @@
 e().
-requestRegistrationId(%22955057365401
+initialize(this, %22PIaD6TaVt7wvKwao%22, %22FD2w93wXcWlb68ILOObsKz5P3af9oVMo
 %22);%0A
@@ -844,36 +844,36 @@
 oVMo%22);%0A%09%09Growth
-Link
+Push
 .getInstance().i
@@ -875,78 +875,43 @@
 e().
-initialize(this, %22P5C3vzoLOEijnlVj%22, %22btFlFAitBJ1CBdL3IR3ROnhLYbeqmLlY
+requestRegistrationId(%22955057365401
 %22);%0A
@@ -975,17 +975,16 @@
 ata());%0A
-%09
 %0A%09%09findV

Modify applicationId and credentialId of sample