Documentation and Tutorials

On this page, you can find links to tutorials about how to create basic context-aware applications, and use more advanced components of the Context Toolkit and extensions. We will continue to write more tutorials soon. We also provide overview documentation and an API Javadoc.

Documentation and Overviews


We include several demo applications in the source code, which can be used as reference implementations on how to build your own context-aware applications. They are located in the Java package context.apps.demos, and contain resource files in the directory /demos.

Demo Application Java Package context.apps.demos.* Resource Directory /demos/*
Hello World application helloroom helloroom
Rule-based application about a smart room light control roomlight room-rules
Instant Messaging application that uses a learned Decision Tree to predict response time imautostatus imautostatus-dtree
Mobile phone application that uses a naive Bayes classifier to infer physical activity from the accelerometer accelerometer accelerometer-nb
Smart home application that uses a hidden Markov model (HMM) to infer domestic activity from binary sensors homeactivity home-hmm

Hello World Tutorial: To get a quick introduction to how to build with the Context Toolkit using existing components, take a look at this tutorial.

Context Toolkit and the Enactor Framework

Context Toolkit Primer: Learn how to build a context-aware application in four basic steps. This tutorial describes how to build a living room smart lamp system, which is a rule-based context-aware application.

  1. Primer Part 1: Modeling context with Widgets (XML version)
  2. Primer Part 2: Modeling logic with Enactors (XML version)
  3. Primer Part 3: Modeling behavior (with Services or with EnactorListeners)
  4. Primer Part 4: Putting it all together as a Context-Aware Application (XML version)

Currently, there are two ways to implement Widgets and Enactors, the regular way using only Java code, and the declarative way using XML files.

We also have some tutorials discussing advanced concepts in the Context Toolkit:

Context Toolkit and Machine Learning

Statistical machine learning is fast becoming a popular mechanism to support activity recognition in context-aware applications. Particularly, WEKA is a popular tool to help developers choose, build, and optimize classifiers to infer or predict concepts. While Machine Learning is an exciting field, we do not provide tutorials on the subject. An interested reader may find out more about this field from online sources, textbooks or courses.

Though the Enactor framework, the Context Toolkit currently supports classifiers of WEKA to make it easier to build context-aware applications with classifier models. We have two tutorials:

  1. Machine Learning: Decision Tree Enactor
  2. Machine Learning: Naive Bayes Enactor

Another classification model that is popular for activity recognition are Hidden Markov Models (HMM). This allows inference to be done over a sequence of observations, and can predict hidden states over the same sequence length. This allows the classification to depend on historical information, and makes the model “smoother.” Learn how to build a context-aware application with a HMM in this tutorial:

Context Toolkit and Intelligibility

Context-aware applications can sense contexts, make decisions, and take actions often implicitly, and using increasingly sophisticated logic (complex rules and/or machine learning). This may make them a mystery to everyday users of these applications that are becoming more readily available (e.g., location-aware mobile phones). To allow users to understand how they work and increase their trust in these increasingly autonomous applications, we believe, they need to be intelligible; they need to be able to explain themselves to users to reveal what they know, what they are doing, and how.

We have developed the Intelligibility Toolkit to provide support for making context-aware applications intelligible. Here are a few tutorials describing how to use its components:

  1. Intelligibility Hello World
  2. Intelligibility Toolkit Overview

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">