ManySense (2014-)

Type: Context-aware middleware for Android

Purpose: to provide application developers with 1) uniform access to heterogeneous context sources; 2) a mechanism to control and query context sources; 3) a way to add new context sources; and 4) access to refined context data (e.g. user’s activity)

Place: anywhere (Ajou University)

Technologies: Android, a variety of internal and external sensors, external context data sources.

Period: 2014-

Contributors: Joonas Westlin and Teemu H. Laine

Smartphone is an excellent platform for context-aware applications thanks to its mobility, a range of embedded sensors and wireless connectivity. Most smartphone platforms contain tools that programmers can use to access these features easily. For example, Android provides convenient access to onboard sensors through the Location and Sensor APIs.

Recent advances in ubiquitous technology has enabled a new wave of consumer-oriented wearable sensor devices that monitor different aspects of a human body such as heart rate, temperature, perspiration and motion. Such wearable sensors are especially prominent for wellness applications targeting at measuring physiological properties of a human body. From programming point of view, wearable sensors, or any other external context sources, require custom access methods specified by the device manufacturers or service providers.

ManySense is a middleware that primarily aims at providing a single-point access to heterogeneous context data sources such as internal and external sensors as well as internet services. For example, an application using ManySense could retrieve data from on-device accelerometer, smart watch accelerometer and an online weather service to build an exergame application that takes into account changes in the weather. The user of the middleware will not have to specify what device ManySense should use, it will use anything that is available. ManySense runs as a background service on Android and provides access to context data sources in a uniform manner. Providing access to context data is not the only thing that ManySense can do. The ManySense concept also has:

  • ManySense Query Language to allow application developers to send textual runtime queries and control messages to sensor devices to retrieve data, start/stop devices or change sensing interval, for example.
  • Context inferencing module that analyzes and fuses raw context data to infer high level context of the user, such as what is the user’s current activity (e.g., running, walking, standing), who else are with the user, what objects are nearby the user, and so on. (work-in-progress)
  • Server component to store and retrieve context information, as well as perform more complex context inferencing. (work-in-progress)
  • Caching to allow developers to make queries based on previous data, many inferencing algorithms also require access to past data. (work-in-progress)
  • Adapter SDK to support developers in extending the capabilities of the middleware through tools and documentation

So how exactly does ManySense manage a myriad of heterogeneous sensor devices and other context sources? Figure 1 explains the architecture of ManySense. The aggregators (Raw Data Aggregator and Context Data Aggregator) gather data from sensors and context inferencing algorithms, and distribute them to third-party subscriber applications. The Raw Data Aggregator (RDA) communicates with different sensors through sensor adapters. There exists one adapter per each supported sensor and each adapter holds specific functionality for acquiring data from a specific sensor. Sensor devices are not limited to one protocol because the adapters handle communication with the sensor devices using required protocol such as Bluetooth or HTTP. For example, in addition to Bluetooth-based sensor adapters we could create a sensor adapter for acquiring data from a sensor web using HTTP. When sensor adapters receive updates they publish sensor events to the RDA which, in turn, forwards the data to the subscribers which are subscribed to that sensor’s data. Sensor adapters offer a common interface for the RDA. This way the individual adapter implementations are hidden and the aggregator does not need to be concerned by them. It is also easy to add new sensor adapters, thus improving extensibility.


The context inferencing adapters also subscribe to raw sensor data if they require it, through the RDA. When a change is detected, an event is sent to subscribers through the context data aggregator. The context inferencing adapters can also utilize the server component to store and retrieve context information, as well as perform complex inferencing tasks. Developers will also be able to specify their own server, which must have the same service interface as the standard server.

For more information about ManySense, see:

Leave a Reply

Your email address will not be published.

Anti-Spam Quiz: