The growth of ubiquitous computing has given rise to a range of possibilities for context-based application development. Technologies for mobile computing and context-awareness can be combined to create innovative ubiquitous computing applications. However, the ubiquitous computing paradigm poses a number of difficult challenges that must be repeatedly faced by developers. For each ubiquitous computing application developed, issues such as the unreliability of network connections, how to reason about context data, and how to provide easily usable interfaces must be dealt with by developers. This paper addresses a generic framework to support the design and implementation of mobile, context-aware applications that are user-activity-centric, and consider the core concept of a trail. A trail is a collection of locations, together with associated information and activities, and a dynamically reconfigurable recommended visiting order. We consider mobile, context-aware trails-based applicati...