diff options
Diffstat (limited to 'same-android/src')
-rw-r--r-- | same-android/src/main/java/com/orbekk/same/android/MainActivity.java | 3 | ||||
-rw-r--r-- | same-android/src/main/java/com/orbekk/same/android/benchmark/ExampleProtobufServerActivity.java | 19 |
2 files changed, 22 insertions, 0 deletions
diff --git a/same-android/src/main/java/com/orbekk/same/android/MainActivity.java b/same-android/src/main/java/com/orbekk/same/android/MainActivity.java index 87ec967..4714b37 100644 --- a/same-android/src/main/java/com/orbekk/same/android/MainActivity.java +++ b/same-android/src/main/java/com/orbekk/same/android/MainActivity.java @@ -17,6 +17,7 @@ import android.widget.ArrayAdapter; import android.widget.ListView; import com.orbekk.same.android.R; +import com.orbekk.same.android.benchmark.ExampleProtobufServerActivity; import com.orbekk.same.android.benchmark.RepeatedSetVariableActivity; public class MainActivity extends Activity { @@ -30,6 +31,8 @@ public class MainActivity extends Activity { activities.put("State monitor", StateViewerActivity.class); activities.put("Graphics demo", GraphicsActivity.class); activities.put("Benchmark", RepeatedSetVariableActivity.class); + activities.put("ExampleProtobufServer (temp)", + ExampleProtobufServerActivity.class); } public final static List<String> activityList = diff --git a/same-android/src/main/java/com/orbekk/same/android/benchmark/ExampleProtobufServerActivity.java b/same-android/src/main/java/com/orbekk/same/android/benchmark/ExampleProtobufServerActivity.java new file mode 100644 index 0000000..c6be5a4 --- /dev/null +++ b/same-android/src/main/java/com/orbekk/same/android/benchmark/ExampleProtobufServerActivity.java @@ -0,0 +1,19 @@ +package com.orbekk.same.android.benchmark; + +import android.app.Activity; + +import com.orbekk.same.benchmark.ExampleServer; + +public class ExampleProtobufServerActivity extends Activity { + public final ExampleServer server = new ExampleServer(); + + @Override public void onResume() { + super.onResume(); + server.runServer(12000); + } + + @Override public void onStop() { + super.onStop(); + server.stopServer(); + } +} |