Version 28 (modified by xianyi, 6 years ago) (diff)


Android Sensor Library

JPG Logo

Current Team

Student Researchers

  • Gradeigh D. Clark [gradeighdclark (AT) gmail (DOT) com]
  • Xianyi Gao [xianyigmsn (AT) hotmail (DOT) com]
  • Malathi Dharmalingam [dharmalingam (DOT) malathi (AT) gmail (DOT) com]
  • Theophilius Mensah [aimthesun (AT) yahoo (DOT) com]

Project Advisors

  • Ivan Seskar [sekar (AT) winlab (DOT) rutgers (DOT) edu]
  • Marco Gruteser [gruteser (AT) winlab (DOT) rutgers (DOT) edu]
  • Janne Lindqvist [janne (AT) winlab (DOT) rutgers (DOT) edu]
  • Kiran Nagaraja [nkiran (AT) winlab (DOT) rutgers (DOT) edu]


The goal of this summer project is to develop a library to more freely manipulate the sensors on Android devices. If a simple, usable library exists for sensor manipulation on Android devices then development of applications to use and analyze sensor data could be accelerated enormously. There is a considerable investment of time required as of now in regards to how much an individual needs to learn about gathering Android sensor data prior to actually using it -- it is our hope that with this project, developers can bypass these beginning steps and start the task of actually developing applications with their data rather than spending time to obtain it.
In the long term, there exists a hope that the project will blossom into a general open-source sensor library where any individual regardless of creed and affiliation who wish to contribute to the library can do so without impedance.


The library was written using Eclipse with the Android plugin tools. To use the library and add onto it, it is recommended to use Eclipse in the same fashion.

Current Progress


To begin, the latest version of project's code can be viewed here, on the project's github page.

Currently, a very simple version library has been constructed revolving around sensors controlled by the Android SensorManager? class with two additional sensors: the microphone and the GPS.

The current sensors that the application is capable of supporting are:

Sensor Name SensorManager Sensor
Ambient TemperatureYes
Linear AccelerationYes
Magnetic FieldYes
Relative HumidityYes
Rotation VectorYes

Although sensors like Relative Humidity, Temperature, and Pressure (to name a few) have existing support in Android, that is not to say there are many (any?) devices out there that actually have these sensors built into them.

Supported Functionality

  • Can determine which sensors are available on the device
  • Can specify individual update rates for all SensorManager sensors
  • Can use predefined sampling rates for microphone, GPS
  • Specific events can be marked during logging, allowing a user to tag the data
  • A specific snapshot of data can be taken over a user controlled time interval during logging
  • Microphone & GPS can be constructed with user controlled characteristics (Encoding, channel, etc.)

Sensor data can be logged in two different ways:

  • Writing sensor data to a file
  • Writing sensor data to an SQLite database

SensorAdventure Application

  • Uploading sensor data to a server

The first two are currently implemented and the second is not. A robust file upload method needs to be hammered down until the third option can be used effectively.

A more detailed website with pictures and a current version of the app will be coming soon.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Attachments (15)

Download all attachments as: .zip