Home | History | Annotate | Download | only in BatchStepSensor
      1 Android BatchStepSensor Sample
      2 ==============================
      3 
      4 This sample demonstrates the use of the two step sensors (step detector and counter) and
      5 sensor batching.
      6  It shows how to register a SensorEventListener with and without
      7 batching and shows how these events are received.
      8 The Step Detector sensor fires an
      9 event when a step is detected, while the step counter returns the total number of
     10 steps since a listener was first registered for this sensor.
     11 Both sensors only count steps while a listener is registered. This sample only covers the
     12 basic case, where a listener is only registered while the app is running. Likewise,
     13 batched sensors can be used in the background (when the CPU is suspended), which
     14 requires manually flushing the sensor event queue before it overflows, which is not
     15 covered in this sample.
     16 
     17 Pre-requisites
     18 --------------
     19 
     20 - Android SDK v20
     21 - Android Build Tools v20
     22 - Android Support Repository
     23 
     24 Getting Started
     25 ---------------
     26 
     27 This sample uses the Gradle build system. To build this project, use the
     28 "gradlew build" command or use "Import Project" in Android Studio.
     29 
     30 Support
     31 -------
     32 
     33 - Google+ Community: https://plus.google.com/communities/105153134372062985968
     34 - Stack Overflow: http://stackoverflow.com/questions/tagged/android
     35 
     36 If you've found an error in this sample, please file an issue:
     37 https://github.com/googlesamples/android-BatchStepSensor
     38 
     39 Patches are encouraged, and may be submitted by forking this project and
     40 submitting a pull request through GitHub. Please see CONTRIBUTING.md for more details.
     41 
     42 License
     43 -------
     44 
     45 Copyright 2014 The Android Open Source Project, Inc.
     46 
     47 Licensed to the Apache Software Foundation (ASF) under one or more contributor
     48 license agreements.  See the NOTICE file distributed with this work for
     49 additional information regarding copyright ownership.  The ASF licenses this
     50 file to you under the Apache License, Version 2.0 (the "License"); you may not
     51 use this file except in compliance with the License.  You may obtain a copy of
     52 the License at
     53 
     54   http://www.apache.org/licenses/LICENSE-2.0
     55 
     56 Unless required by applicable law or agreed to in writing, software
     57 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
     58 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
     59 License for the specific language governing permissions and limitations under
     60 the License.
     61