From 56216a861a0910fb7d4317be4a6c1b43697ebe09 Mon Sep 17 00:00:00 2001 From: Jan-Felix Schmakeit Date: Thu, 2 Jan 2014 11:41:04 +1100 Subject: Add a sample showing the use of the step sensors (STEP_DETECTOR and STEP_COUNTER) and sensor event batching. Change-Id: Ied3a2601b09b12a53ddbe709b959776ca9e87c3c (cherry picked from commit 501ae9a1d88ba4b5c877f4218b75630271c71e3c) --- .../BatchStepSensorSample/README-CardStream.txt | 82 +++ .../src/main/AndroidManifest.xml | 51 ++ .../batchstepsensor/BatchStepSensorFragment.java | 588 +++++++++++++++++++++ .../src/main/res/drawable-hdpi/ic_launcher.png | Bin 0 -> 4402 bytes .../src/main/res/drawable-mdpi/ic_launcher.png | Bin 0 -> 2641 bytes .../src/main/res/drawable-xhdpi/ic_launcher.png | Bin 0 -> 6076 bytes .../src/main/res/drawable-xxhdpi/ic_launcher.png | Bin 0 -> 11109 bytes .../src/main/res/values/strings.xml | 75 +++ sensors/BatchStepSensor/build.gradle | 14 + sensors/BatchStepSensor/buildSrc/build.gradle | 18 + .../gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 49896 bytes .../gradle/wrapper/gradle-wrapper.properties | 6 + sensors/BatchStepSensor/gradlew | 164 ++++++ sensors/BatchStepSensor/gradlew.bat | 90 ++++ sensors/BatchStepSensor/settings.gradle | 4 + sensors/BatchStepSensor/template-params.xml | 53 ++ 16 files changed, 1145 insertions(+) create mode 100644 sensors/BatchStepSensor/BatchStepSensorSample/README-CardStream.txt create mode 100644 sensors/BatchStepSensor/BatchStepSensorSample/src/main/AndroidManifest.xml create mode 100644 sensors/BatchStepSensor/BatchStepSensorSample/src/main/java/com/example/android/batchstepsensor/BatchStepSensorFragment.java create mode 100644 sensors/BatchStepSensor/BatchStepSensorSample/src/main/res/drawable-hdpi/ic_launcher.png create mode 100644 sensors/BatchStepSensor/BatchStepSensorSample/src/main/res/drawable-mdpi/ic_launcher.png create mode 100644 sensors/BatchStepSensor/BatchStepSensorSample/src/main/res/drawable-xhdpi/ic_launcher.png create mode 100644 sensors/BatchStepSensor/BatchStepSensorSample/src/main/res/drawable-xxhdpi/ic_launcher.png create mode 100644 sensors/BatchStepSensor/BatchStepSensorSample/src/main/res/values/strings.xml create mode 100644 sensors/BatchStepSensor/build.gradle create mode 100644 sensors/BatchStepSensor/buildSrc/build.gradle create mode 100644 sensors/BatchStepSensor/gradle/wrapper/gradle-wrapper.jar create mode 100644 sensors/BatchStepSensor/gradle/wrapper/gradle-wrapper.properties create mode 100755 sensors/BatchStepSensor/gradlew create mode 100644 sensors/BatchStepSensor/gradlew.bat create mode 100644 sensors/BatchStepSensor/settings.gradle create mode 100644 sensors/BatchStepSensor/template-params.xml (limited to 'sensors') diff --git a/sensors/BatchStepSensor/BatchStepSensorSample/README-CardStream.txt b/sensors/BatchStepSensor/BatchStepSensorSample/README-CardStream.txt new file mode 100644 index 00000000..957ccd65 --- /dev/null +++ b/sensors/BatchStepSensor/BatchStepSensorSample/README-CardStream.txt @@ -0,0 +1,82 @@ +<#-- + Copyright 2013 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +Steps to implement CardStream template: +-in template-params.xml.ftl: + -add the following templates +