diff --git a/sample-game/.project b/sample-game/.project
new file mode 100644
index 0000000..3ba6a91
--- /dev/null
+++ b/sample-game/.project
@@ -0,0 +1,33 @@
+
+
+ MainActivity
+
+
+
+
+
+ com.android.ide.eclipse.adt.ResourceManagerBuilder
+
+
+
+
+ com.android.ide.eclipse.adt.PreCompilerBuilder
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ com.android.ide.eclipse.adt.ApkBuilder
+
+
+
+
+
+ com.android.ide.eclipse.adt.AndroidNature
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/sample-game/.settings/org.eclipse.jdt.core.prefs b/sample-game/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..b080d2d
--- /dev/null
+++ b/sample-game/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,4 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/sample/AndroidManifest.xml b/sample-game/AndroidManifest.xml
old mode 100644
new mode 100755
similarity index 100%
rename from sample/AndroidManifest.xml
rename to sample-game/AndroidManifest.xml
diff --git a/sample/libs/android-support-v4.jar b/sample-game/libs/android-support-v4.jar
similarity index 100%
rename from sample/libs/android-support-v4.jar
rename to sample-game/libs/android-support-v4.jar
diff --git a/sample/libs/google-play-services.jar b/sample-game/libs/google-play-services.jar
similarity index 100%
rename from sample/libs/google-play-services.jar
rename to sample-game/libs/google-play-services.jar
diff --git a/sample/libs/growthpush.jar b/sample-game/libs/growthpush.jar
similarity index 100%
rename from sample/libs/growthpush.jar
rename to sample-game/libs/growthpush.jar
diff --git a/sample/proguard-project.txt b/sample-game/proguard-project.txt
old mode 100644
new mode 100755
similarity index 100%
rename from sample/proguard-project.txt
rename to sample-game/proguard-project.txt
diff --git a/sample/project.properties b/sample-game/project.properties
old mode 100644
new mode 100755
similarity index 100%
rename from sample/project.properties
rename to sample-game/project.properties
diff --git a/sample/res/drawable-hdpi/ic_launcher.png b/sample-game/res/drawable-hdpi/ic_launcher.png
old mode 100644
new mode 100755
similarity index 100%
rename from sample/res/drawable-hdpi/ic_launcher.png
rename to sample-game/res/drawable-hdpi/ic_launcher.png
diff --git a/sample-game/res/drawable-hdpi/paper.png b/sample-game/res/drawable-hdpi/paper.png
new file mode 100644
index 0000000..08f32c3
Binary files /dev/null and b/sample-game/res/drawable-hdpi/paper.png differ
diff --git a/sample-game/res/drawable-hdpi/rock.png b/sample-game/res/drawable-hdpi/rock.png
new file mode 100644
index 0000000..ccdbebf
Binary files /dev/null and b/sample-game/res/drawable-hdpi/rock.png differ
diff --git a/sample-game/res/drawable-hdpi/scissors.png b/sample-game/res/drawable-hdpi/scissors.png
new file mode 100644
index 0000000..d225174
Binary files /dev/null and b/sample-game/res/drawable-hdpi/scissors.png differ
diff --git a/sample-game/res/drawable-ldpi/paper.png b/sample-game/res/drawable-ldpi/paper.png
new file mode 100644
index 0000000..784eee4
Binary files /dev/null and b/sample-game/res/drawable-ldpi/paper.png differ
diff --git a/sample-game/res/drawable-ldpi/rock.png b/sample-game/res/drawable-ldpi/rock.png
new file mode 100644
index 0000000..3fc1bbe
Binary files /dev/null and b/sample-game/res/drawable-ldpi/rock.png differ
diff --git a/sample-game/res/drawable-ldpi/scissors.png b/sample-game/res/drawable-ldpi/scissors.png
new file mode 100644
index 0000000..3c904fe
Binary files /dev/null and b/sample-game/res/drawable-ldpi/scissors.png differ
diff --git a/sample/res/drawable-mdpi/ic_launcher.png b/sample-game/res/drawable-mdpi/ic_launcher.png
old mode 100644
new mode 100755
similarity index 100%
rename from sample/res/drawable-mdpi/ic_launcher.png
rename to sample-game/res/drawable-mdpi/ic_launcher.png
diff --git a/sample-game/res/drawable-mdpi/paper.png b/sample-game/res/drawable-mdpi/paper.png
new file mode 100644
index 0000000..4f3a138
Binary files /dev/null and b/sample-game/res/drawable-mdpi/paper.png differ
diff --git a/sample-game/res/drawable-mdpi/rock.png b/sample-game/res/drawable-mdpi/rock.png
new file mode 100644
index 0000000..cbafe96
Binary files /dev/null and b/sample-game/res/drawable-mdpi/rock.png differ
diff --git a/sample-game/res/drawable-mdpi/scissors.png b/sample-game/res/drawable-mdpi/scissors.png
new file mode 100644
index 0000000..cf8d47b
Binary files /dev/null and b/sample-game/res/drawable-mdpi/scissors.png differ
diff --git a/sample/res/drawable-xhdpi/ic_launcher.png b/sample-game/res/drawable-xhdpi/ic_launcher.png
old mode 100644
new mode 100755
similarity index 100%
rename from sample/res/drawable-xhdpi/ic_launcher.png
rename to sample-game/res/drawable-xhdpi/ic_launcher.png
diff --git a/sample-game/res/drawable-xhdpi/paper.png b/sample-game/res/drawable-xhdpi/paper.png
new file mode 100644
index 0000000..ee343c2
Binary files /dev/null and b/sample-game/res/drawable-xhdpi/paper.png differ
diff --git a/sample-game/res/drawable-xhdpi/rock.png b/sample-game/res/drawable-xhdpi/rock.png
new file mode 100644
index 0000000..74683a8
Binary files /dev/null and b/sample-game/res/drawable-xhdpi/rock.png differ
diff --git a/sample-game/res/drawable-xhdpi/scissors.png b/sample-game/res/drawable-xhdpi/scissors.png
new file mode 100644
index 0000000..6e47bb1
Binary files /dev/null and b/sample-game/res/drawable-xhdpi/scissors.png differ
diff --git a/sample-game/res/layout/activity_main.xml b/sample-game/res/layout/activity_main.xml
new file mode 100755
index 0000000..1537fcc
--- /dev/null
+++ b/sample-game/res/layout/activity_main.xml
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sample/res/menu/main.xml b/sample-game/res/menu/main.xml
old mode 100644
new mode 100755
similarity index 100%
rename from sample/res/menu/main.xml
rename to sample-game/res/menu/main.xml
diff --git a/sample/res/values-sw600dp/dimens.xml b/sample-game/res/values-sw600dp/dimens.xml
old mode 100644
new mode 100755
similarity index 100%
rename from sample/res/values-sw600dp/dimens.xml
rename to sample-game/res/values-sw600dp/dimens.xml
diff --git a/sample/res/values-sw720dp-land/dimens.xml b/sample-game/res/values-sw720dp-land/dimens.xml
old mode 100644
new mode 100755
similarity index 100%
rename from sample/res/values-sw720dp-land/dimens.xml
rename to sample-game/res/values-sw720dp-land/dimens.xml
diff --git a/sample/res/values-v11/styles.xml b/sample-game/res/values-v11/styles.xml
old mode 100644
new mode 100755
similarity index 100%
rename from sample/res/values-v11/styles.xml
rename to sample-game/res/values-v11/styles.xml
diff --git a/sample/res/values-v14/styles.xml b/sample-game/res/values-v14/styles.xml
old mode 100644
new mode 100755
similarity index 100%
rename from sample/res/values-v14/styles.xml
rename to sample-game/res/values-v14/styles.xml
diff --git a/sample/res/values/dimens.xml b/sample-game/res/values/dimens.xml
old mode 100644
new mode 100755
similarity index 100%
rename from sample/res/values/dimens.xml
rename to sample-game/res/values/dimens.xml
diff --git a/sample-game/res/values/strings.xml b/sample-game/res/values/strings.xml
new file mode 100755
index 0000000..4753ebd
--- /dev/null
+++ b/sample-game/res/values/strings.xml
@@ -0,0 +1,10 @@
+
+
+
+ GrowthPushSample
+ Settings
+ グー
+ チョキ
+ パー
+
+
diff --git a/sample/res/values/styles.xml b/sample-game/res/values/styles.xml
old mode 100644
new mode 100755
similarity index 100%
rename from sample/res/values/styles.xml
rename to sample-game/res/values/styles.xml
diff --git a/sample-game/src/com/growthpush/growthpushsample/MainActivity.java b/sample-game/src/com/growthpush/growthpushsample/MainActivity.java
new file mode 100755
index 0000000..a944c53
--- /dev/null
+++ b/sample-game/src/com/growthpush/growthpushsample/MainActivity.java
@@ -0,0 +1,68 @@
+package com.growthpush.growthpushsample;
+
+import java.util.Random;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.view.Menu;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.growthpush.GrowthPush;
+import com.growthpush.model.Environment;
+
+public class MainActivity extends Activity implements OnClickListener{
+
+ private int[] myImageList = new int[]{R.drawable.rock, R.drawable.paper, R.drawable.scissors};
+ private String results[][] = {{"tie","loss","win"},{"win","tie","loss"},{"loss","win","tie"}};
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_main);
+
+ GrowthPush
+ .getInstance()
+ .initialize(getApplicationContext(), 1071, "Ou3DgCwmMS2tBocWXGKSnRUUTyVA078n",
+ BuildConfig.DEBUG ? Environment.development : Environment.production, true).register("955057365401");
+ GrowthPush.getInstance().trackEvent("Launch");
+ }
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ // Inflate the menu; this adds items to the action bar if it is present.
+ getMenuInflater().inflate(R.menu.main, menu);
+ return true;
+ }
+
+ @Override
+ public void onClick(View v) {
+ switch (v.getId()) {
+ case R.id.selectRock:
+ playLocal(0);
+ break;
+ case R.id.selectPaper:
+ playLocal(1);
+ break;
+ case R.id.selectScissors:
+ playLocal(2);
+ break;
+ }
+ }
+
+ private void playLocal(int playerSelect) {
+ ImageView playerImage = (ImageView) findViewById(R.id.imageView1);
+ playerImage.setImageResource(this.myImageList[playerSelect]);
+
+ ImageView enemyImage = (ImageView) findViewById(R.id.imageView2);
+ int enemySelect = new Random(System.currentTimeMillis()).nextInt(this.myImageList.length);
+ enemyImage.setImageResource(this.myImageList[enemySelect]);
+ ((TextView) findViewById(R.id.textView1)).setText(results[playerSelect][enemySelect]);
+
+ //Event,Tag Post
+ GrowthPush.getInstance().trackEvent("GameResult", results[playerSelect][enemySelect]);
+ GrowthPush.getInstance().setDeviceTags();
+ }
+}
\ No newline at end of file
diff --git a/sample/.project b/sample-simple/.project
similarity index 100%
rename from sample/.project
rename to sample-simple/.project
diff --git a/sample-simple/.settings/org.eclipse.jdt.core.prefs b/sample-simple/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..b080d2d
--- /dev/null
+++ b/sample-simple/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,4 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/sample-simple/AndroidManifest.xml b/sample-simple/AndroidManifest.xml
new file mode 100644
index 0000000..01627a8
--- /dev/null
+++ b/sample-simple/AndroidManifest.xml
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sample-simple/libs/android-support-v4.jar b/sample-simple/libs/android-support-v4.jar
new file mode 120000
index 0000000..6dbec89
--- /dev/null
+++ b/sample-simple/libs/android-support-v4.jar
@@ -0,0 +1 @@
+../../android-support-v4.jar
\ No newline at end of file
diff --git a/sample-simple/libs/google-play-services.jar b/sample-simple/libs/google-play-services.jar
new file mode 120000
index 0000000..b4217af
--- /dev/null
+++ b/sample-simple/libs/google-play-services.jar
@@ -0,0 +1 @@
+../../google-play-services.jar
\ No newline at end of file
diff --git a/sample-simple/libs/growthpush.jar b/sample-simple/libs/growthpush.jar
new file mode 120000
index 0000000..d272047
--- /dev/null
+++ b/sample-simple/libs/growthpush.jar
@@ -0,0 +1 @@
+../../growthpush.jar
\ No newline at end of file
diff --git a/sample-simple/proguard-project.txt b/sample-simple/proguard-project.txt
new file mode 100644
index 0000000..f2fe155
--- /dev/null
+++ b/sample-simple/proguard-project.txt
@@ -0,0 +1,20 @@
+# To enable ProGuard in your project, edit project.properties
+# to define the proguard.config property as described in that file.
+#
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in ${sdk.dir}/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the ProGuard
+# include property in project.properties.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
diff --git a/sample-simple/project.properties b/sample-simple/project.properties
new file mode 100644
index 0000000..a3ee5ab
--- /dev/null
+++ b/sample-simple/project.properties
@@ -0,0 +1,14 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system edit
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+#
+# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
+#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
+
+# Project target.
+target=android-17
diff --git a/sample-simple/res/drawable-hdpi/ic_launcher.png b/sample-simple/res/drawable-hdpi/ic_launcher.png
new file mode 100644
index 0000000..96a442e
Binary files /dev/null and b/sample-simple/res/drawable-hdpi/ic_launcher.png differ
diff --git a/sample-simple/res/drawable-mdpi/ic_launcher.png b/sample-simple/res/drawable-mdpi/ic_launcher.png
new file mode 100644
index 0000000..359047d
Binary files /dev/null and b/sample-simple/res/drawable-mdpi/ic_launcher.png differ
diff --git a/sample-simple/res/drawable-xhdpi/ic_launcher.png b/sample-simple/res/drawable-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..71c6d76
Binary files /dev/null and b/sample-simple/res/drawable-xhdpi/ic_launcher.png differ
diff --git a/sample-simple/res/layout/activity_main.xml b/sample-simple/res/layout/activity_main.xml
new file mode 100644
index 0000000..b7ce8c1
--- /dev/null
+++ b/sample-simple/res/layout/activity_main.xml
@@ -0,0 +1,104 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sample-simple/res/menu/main.xml b/sample-simple/res/menu/main.xml
new file mode 100644
index 0000000..c002028
--- /dev/null
+++ b/sample-simple/res/menu/main.xml
@@ -0,0 +1,9 @@
+
diff --git a/sample-simple/res/values-sw600dp/dimens.xml b/sample-simple/res/values-sw600dp/dimens.xml
new file mode 100644
index 0000000..44f01db
--- /dev/null
+++ b/sample-simple/res/values-sw600dp/dimens.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
diff --git a/sample-simple/res/values-sw720dp-land/dimens.xml b/sample-simple/res/values-sw720dp-land/dimens.xml
new file mode 100644
index 0000000..61e3fa8
--- /dev/null
+++ b/sample-simple/res/values-sw720dp-land/dimens.xml
@@ -0,0 +1,9 @@
+
+
+
+ 128dp
+
+
diff --git a/sample-simple/res/values-v11/styles.xml b/sample-simple/res/values-v11/styles.xml
new file mode 100644
index 0000000..3c02242
--- /dev/null
+++ b/sample-simple/res/values-v11/styles.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
diff --git a/sample-simple/res/values-v14/styles.xml b/sample-simple/res/values-v14/styles.xml
new file mode 100644
index 0000000..a91fd03
--- /dev/null
+++ b/sample-simple/res/values-v14/styles.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
diff --git a/sample-simple/res/values/dimens.xml b/sample-simple/res/values/dimens.xml
new file mode 100644
index 0000000..55c1e59
--- /dev/null
+++ b/sample-simple/res/values/dimens.xml
@@ -0,0 +1,7 @@
+
+
+
+ 16dp
+ 16dp
+
+
diff --git a/sample/res/values/strings.xml b/sample-simple/res/values/strings.xml
similarity index 100%
rename from sample/res/values/strings.xml
rename to sample-simple/res/values/strings.xml
diff --git a/sample-simple/res/values/styles.xml b/sample-simple/res/values/styles.xml
new file mode 100644
index 0000000..6ce89c7
--- /dev/null
+++ b/sample-simple/res/values/styles.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
diff --git a/sample/src/com/growthpush/growthpushsample/MainActivity.java b/sample-simple/src/com/growthpush/growthpushsample/MainActivity.java
similarity index 50%
rename from sample/src/com/growthpush/growthpushsample/MainActivity.java
rename to sample-simple/src/com/growthpush/growthpushsample/MainActivity.java
index f8313db..1e1750d 100644
--- a/sample/src/com/growthpush/growthpushsample/MainActivity.java
+++ b/sample-simple/src/com/growthpush/growthpushsample/MainActivity.java
@@ -3,11 +3,14 @@
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.EditText;
import com.growthpush.GrowthPush;
import com.growthpush.model.Environment;
-public class MainActivity extends Activity {
+public class MainActivity extends Activity implements OnClickListener{
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -19,8 +22,6 @@ protected void onCreate(Bundle savedInstanceState) {
.initialize(getApplicationContext(), 1071, "Ou3DgCwmMS2tBocWXGKSnRUUTyVA078n",
BuildConfig.DEBUG ? Environment.development : Environment.production, true).register("955057365401");
GrowthPush.getInstance().trackEvent("Launch");
- GrowthPush.getInstance().setDeviceTags();
-
}
@Override
@@ -30,4 +31,27 @@ public boolean onCreateOptionsMenu(Menu menu) {
return true;
}
+ @Override
+ public void onClick(View v) {
+ switch (v.getId()) {
+ case R.id.button1:
+ //Event Post
+ GrowthPush.getInstance().trackEvent(
+ ((EditText) findViewById(R.id.editText1)).getText().toString(),
+ ((EditText) findViewById(R.id.editText2)).getText().toString());
+ break;
+ case R.id.button2:
+ //Tag Post
+ GrowthPush.getInstance().setTag(
+ ((EditText) findViewById(R.id.editText3)).getText().toString(),
+ ((EditText) findViewById(R.id.editText4)).getText().toString());
+ break;
+ case R.id.button3:
+ //setDeviceTags
+ GrowthPush.getInstance().setDeviceTags();
+ break;
+ default:
+ break;
+ }
+ }
}
diff --git a/sample/res/layout/activity_main.xml b/sample/res/layout/activity_main.xml
deleted file mode 100644
index 168c9b8..0000000
--- a/sample/res/layout/activity_main.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-