Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

SensingKit-Android Library

An Android library that provides Continuous Sensing functionality to your applications. For more information, please refer to the project website.

Supported Sensors

The following sensor modules are currently supported in SensingKit-Android, (listed in SKSensorModuleType enum):

  • Accelerometer
  • Gravity
  • Linear Acceleration
  • Gyroscope
  • Rotation
  • Magnetometer
  • Ambient Temperature
  • Step Detector
  • Step Counter
  • Light
  • Location
  • Activity
  • Battery
  • Screen Status
  • Audio Recorder
  • Audio Level
  • Bluetooth

Configuring the Library

  • Build the library using the command:
./gradlew build
  • Create an app/libs directory inside your project and copy the generated SensingKitLib/build/outputs/aar/SensingKitLib-release.aar (or the equivalent debug) file there.

  • Edit your app/build.gradle file and add a flatDir entry as shown bellow:

repositories {
    flatDir {
        dirs 'libs'
  • In the same app/build.gradle file, add SensingKitLib as a dependency as shown below:
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'org.sensingkit:SensingKitLib-release@aar'
    compile '’
    compile ''

How to Use this Library

  • Import and init SensingKit into your Activity class as shown bellow:
import org.sensingkit.sensingkitlib.SensingKitLib;

SensingKitLibInterface mSensingKitLib = SensingKitLib.getSensingKitLib(this);
  • Register a sensor module (e.g. a Light sensor) as shown bellow:
  • Subscribe a sensor data listener:
mSensingKitLib.subscribeSensorDataListener(SKSensorModuleType.LIGHT, new SKSensorDataListener() {
    public void onDataReceived(final SKSensorModuleType moduleType, final SKSensorData sensorData) {
        System.out.println(sensorData.getDataInCSV());  // Print data in CSV format
  • You can cast the data object into the actual sensor data object in order to access all the sensor data properties:
SKLightData lightData = (SKLightData)sensorData;
  • You can Start and Stop the Continuous Sensing using the following commands:

For a complete description of our API, please refer to the project website.


Copyright (c) 2014. Queen Mary University of London
Kleomenis Katevas,

This file is part of SensingKit-Android library.
For more information, please visit

SensingKit-Android is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

SensingKit-Android is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with SensingKit-Android.  If not, see <>.

This library is available under the GNU Lesser General Public License 3.0, allowing to use the library in your applications.

If you want to help with the open source project, contact

You can’t perform that action at this time.