From 679f7f7a61413acbeff0f8012b5cb7838f390baf Mon Sep 17 00:00:00 2001 From: Raphael Date: Tue, 13 Mar 2012 13:38:20 -0700 Subject: Skeleton for a SdkController app with a sevice. This is just a basic app that has a background service and an activity to start/stop the service. The service has a binder interface (so that the activities can control the service) and a listener (so that the service can report to activities.) The service automatically starts with the app and there's a toggle for the user to turn it off/on. The activity also reports errors from the service, if any. There's a notification when the service is running. which brings back to the control activity. Change-Id: I67d37e3d905eb328f4d1f7d13fb118f4c7077b74 --- apps/SdkController/.gitignore | 9 - apps/SdkController/SdkControllerApp/.classpath | 8 + apps/SdkController/SdkControllerApp/.project | 33 +++ .../SdkControllerApp/AndroidManifest.xml | 26 +++ .../SdkControllerApp/proguard-project.txt | 20 ++ .../SdkControllerApp/project.properties | 14 ++ .../res/drawable-hdpi/ic_launcher.png | Bin 0 -> 9397 bytes .../res/drawable-ldpi/ic_launcher.png | Bin 0 -> 2729 bytes .../res/drawable-mdpi/ic_launcher.png | Bin 0 -> 5237 bytes .../res/drawable-xhdpi/ic_launcher.png | Bin 0 -> 14383 bytes .../SdkControllerApp/res/layout/main.xml | 108 +++++++++ .../SdkControllerApp/res/values/strings.xml | 38 ++++ .../tools/sdkcontroller/ControllerService.java | 246 +++++++++++++++++++++ .../android/tools/sdkcontroller/MainActivity.java | 219 ++++++++++++++++++ .../tools/sdkcontroller/MultitouchActivity.java | 34 +++ .../tools/sdkcontroller/SensorActivity.java | 34 +++ apps/SdkController/SdkControllerLib/.classpath | 8 + apps/SdkController/SdkControllerLib/.project | 33 +++ .../SdkControllerLib/project.properties | 2 +- .../SdkControllerMultitouch/.classpath | 8 + .../SdkController/SdkControllerMultitouch/.project | 33 +++ .../SdkControllerMultitouch/project.properties | 2 +- apps/SdkController/SdkControllerSensor/.classpath | 8 + apps/SdkController/SdkControllerSensor/.project | 33 +++ .../SdkControllerSensor/project.properties | 2 +- 25 files changed, 906 insertions(+), 12 deletions(-) delete mode 100644 apps/SdkController/.gitignore create mode 100755 apps/SdkController/SdkControllerApp/.classpath create mode 100755 apps/SdkController/SdkControllerApp/.project create mode 100755 apps/SdkController/SdkControllerApp/AndroidManifest.xml create mode 100755 apps/SdkController/SdkControllerApp/proguard-project.txt create mode 100755 apps/SdkController/SdkControllerApp/project.properties create mode 100755 apps/SdkController/SdkControllerApp/res/drawable-hdpi/ic_launcher.png create mode 100755 apps/SdkController/SdkControllerApp/res/drawable-ldpi/ic_launcher.png create mode 100755 apps/SdkController/SdkControllerApp/res/drawable-mdpi/ic_launcher.png create mode 100755 apps/SdkController/SdkControllerApp/res/drawable-xhdpi/ic_launcher.png create mode 100755 apps/SdkController/SdkControllerApp/res/layout/main.xml create mode 100755 apps/SdkController/SdkControllerApp/res/values/strings.xml create mode 100755 apps/SdkController/SdkControllerApp/src/com/android/tools/sdkcontroller/ControllerService.java create mode 100755 apps/SdkController/SdkControllerApp/src/com/android/tools/sdkcontroller/MainActivity.java create mode 100755 apps/SdkController/SdkControllerApp/src/com/android/tools/sdkcontroller/MultitouchActivity.java create mode 100755 apps/SdkController/SdkControllerApp/src/com/android/tools/sdkcontroller/SensorActivity.java create mode 100755 apps/SdkController/SdkControllerLib/.classpath create mode 100755 apps/SdkController/SdkControllerLib/.project create mode 100755 apps/SdkController/SdkControllerMultitouch/.classpath create mode 100755 apps/SdkController/SdkControllerMultitouch/.project create mode 100755 apps/SdkController/SdkControllerSensor/.classpath create mode 100755 apps/SdkController/SdkControllerSensor/.project (limited to 'apps') diff --git a/apps/SdkController/.gitignore b/apps/SdkController/.gitignore deleted file mode 100644 index d3a6cac..0000000 --- a/apps/SdkController/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -bin -gen -.classpath -.project -SdkControllerLib/bin/ -SdkControllerSensor/bin/ -SdkControllerSensor/gen/ -SdkControllerMultitouch/bin/ -SdkControllerMultitouch/gen/ diff --git a/apps/SdkController/SdkControllerApp/.classpath b/apps/SdkController/SdkControllerApp/.classpath new file mode 100755 index 0000000..a4f1e40 --- /dev/null +++ b/apps/SdkController/SdkControllerApp/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/apps/SdkController/SdkControllerApp/.project b/apps/SdkController/SdkControllerApp/.project new file mode 100755 index 0000000..a2d5c18 --- /dev/null +++ b/apps/SdkController/SdkControllerApp/.project @@ -0,0 +1,33 @@ + + + SdkControllerApp + + + + + + 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/apps/SdkController/SdkControllerApp/AndroidManifest.xml b/apps/SdkController/SdkControllerApp/AndroidManifest.xml new file mode 100755 index 0000000..62e498f --- /dev/null +++ b/apps/SdkController/SdkControllerApp/AndroidManifest.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/apps/SdkController/SdkControllerApp/proguard-project.txt b/apps/SdkController/SdkControllerApp/proguard-project.txt new file mode 100755 index 0000000..f2fe155 --- /dev/null +++ b/apps/SdkController/SdkControllerApp/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/apps/SdkController/SdkControllerApp/project.properties b/apps/SdkController/SdkControllerApp/project.properties new file mode 100755 index 0000000..9c52cb1 --- /dev/null +++ b/apps/SdkController/SdkControllerApp/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-15 diff --git a/apps/SdkController/SdkControllerApp/res/drawable-hdpi/ic_launcher.png b/apps/SdkController/SdkControllerApp/res/drawable-hdpi/ic_launcher.png new file mode 100755 index 0000000..96a442e Binary files /dev/null and b/apps/SdkController/SdkControllerApp/res/drawable-hdpi/ic_launcher.png differ diff --git a/apps/SdkController/SdkControllerApp/res/drawable-ldpi/ic_launcher.png b/apps/SdkController/SdkControllerApp/res/drawable-ldpi/ic_launcher.png new file mode 100755 index 0000000..9923872 Binary files /dev/null and b/apps/SdkController/SdkControllerApp/res/drawable-ldpi/ic_launcher.png differ diff --git a/apps/SdkController/SdkControllerApp/res/drawable-mdpi/ic_launcher.png b/apps/SdkController/SdkControllerApp/res/drawable-mdpi/ic_launcher.png new file mode 100755 index 0000000..359047d Binary files /dev/null and b/apps/SdkController/SdkControllerApp/res/drawable-mdpi/ic_launcher.png differ diff --git a/apps/SdkController/SdkControllerApp/res/drawable-xhdpi/ic_launcher.png b/apps/SdkController/SdkControllerApp/res/drawable-xhdpi/ic_launcher.png new file mode 100755 index 0000000..71c6d76 Binary files /dev/null and b/apps/SdkController/SdkControllerApp/res/drawable-xhdpi/ic_launcher.png differ diff --git a/apps/SdkController/SdkControllerApp/res/layout/main.xml b/apps/SdkController/SdkControllerApp/res/layout/main.xml new file mode 100755 index 0000000..612b9fc --- /dev/null +++ b/apps/SdkController/SdkControllerApp/res/layout/main.xml @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + +