18-06-2013, 04:01 PM
CodeDroid: A Framework to Develop Context-Aware Applications
CodeDroid A Framework.pdf (Size: 353.51 KB / Downloads: 62)
Abstract
Context-aware computing enables the development
of systems that adapt themselves to the context of the
user, device and surrounding environment. To represent the
context information associated with the application, this work
proposes the use of a profile. This paper also proposes the
CodeDroid framework, based on the Android platform, to
help a designer in the development of context-aware mobile
applications for different domains. This strategy showed to
provide greater modularity and reuse of components. The
CodeDroid framework also brings together the most generic
services used to collect context, as discussed in the development
of Places2Go, a tourism application.
INTRODUCTION
The use of mobile devices is a common aspect of our lives.
These devices have more features, more processing power
and communication capacity. With the increased use of
mobile devices new computing platforms were designed for
that environment. Among them we can mention the Android
platform that deservers special attention since is becoming
the dominant operating system in mobile devices. Due to the
success of these platforms, there is an increase in the design
of context-aware applications that make use of existing information
collected from sensing devices and other user-related
information. To facilitate the development of applications
and achieve greater productivity, it is recommended to use
frameworks or other similar computational tools that help
designers to optimize their work. For example, a single
application for a mobile computing environment may have
to consider dozens of portable devices with different characteristics
and it can be customized to meet the requirements
of different users.
ANDROID PLATFORM
We used the Android platform1 to implement the Code-
Droid framework. Among the advantages of this platform
we highlight the portability, because it uses its own virtual
machine (Dalvik). It is based on open code, which allows
greater flexibility in the application development. It also
has a robust development environment with tools for code
debugging and performance evaluation. It also provides
facilities to access device features (e.g., GPS, camera, battery,
network, among others). To build applications for the
Android platform, we use the following components:
Activity: most activities interact with the user. Therefore,
the activity is responsible for creating the window in which
the graphical user interface will be built. An activity may
be presented as a floating window or embedded in another
activity.
Design Patterns
The framework CodeDroid has been developed based on
design patterns. The standards used in architectural modeling
of Android were MVC (Model-View-Controller), Facade,
Singleton and Observer. The MVC architectural pattern was
the starting point in the design of the CodeDroid framework.
However, we found that the Android platform presents
some shortcomings to use this model. The purpose of the
CodeDroid framework is to organize the architecture of
Android applications to follow the MVC model. The class
ActivityBase, its subclasses and other activities represent the
view layer. Another important component that is included
in the view layer is the layout — XML files built from
predefined tags that represent the visual components of
the Android platform. The offered service by the class
ProfileControllerBase together with their subclasses is the
application control layer. The model layer is represented by
the entity profile.
FRAMEWORK EVALUATION
To evaluate the CodeDroid framework we developed a
context aware mobile application for a tourist scenario. In
tourist cities that attract many visitors, it is very common
to find a tour guide. The role of the guide is to help people
to know the city, drive and visite the main sightseeing,
recommend interesting places and local restaurants based
on the profile, help visitors locate themselves in the city,
among other functions.
CONCLUSION AND FUTURE WORK
This paper presented the concept of a profile as an entity
to represent context, adding the most relevant information
for decision-making applications. To demonstrate the use of
the profile and help the development of context-aware mobile
applications, we developed the CodeDroid framework.
The application Places2Go, developed by the framework,
has the capability of being extensible, modular and allows
the reuse of components. The tool eases the development
of applications, reducing the need for coding the generic
functionalities provided by the CodeDroid framework. The
application was evaluated in both emulated and real environments,
with good performance results. As future work, we
can mention the extension of the CodeDroid framework to
support new features (e.g., sensing devives), the evaluation
of the framework in different scenarios and its portability to
other mobile platforms.