diff options
3 files changed, 23 insertions, 0 deletions
diff --git a/same-android/AndroidManifest.xml b/same-android/AndroidManifest.xml index 59af81a..9fdeebd 100644 --- a/same-android/AndroidManifest.xml +++ b/same-android/AndroidManifest.xml @@ -23,6 +23,7 @@ <activity android:name=".StateViewerActivity"/> <activity android:name=".GraphicsActivity"/> <activity android:name="com.orbekk.same.android.benchmark.RepeatedSetVariableActivity"/> + <activity android:name="com.orbekk.same.android.benchmark.ExampleProtobufServerActivity"/> <service android:name=".SameService" android:process="com.orbekk.same.android.SameService"/> </application> 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(); + } +} |