4.2 Architecture
Amarino’s architecture, shown in Figure 7, has five components:
a Graphical User Interface (GUI), Background Service, Bluetooth
Handler, IntentEventMapper and Database. The Background
Service is at the heart of Amarino. It listens for sensor and phone
state information, generates events, sends events, and maintains
Bluetooth connections. The Bluetooth Handler implements lowlevel
access to the Bluetooth functions of the operating system.
The IntentEventMapper converts Android “intents” to Amarino
events. Finally, the database stores all of the collection, event,
and Bluetooth device history and the GUI makes all of this
functionality accessible to the user.