Peeble

1. The idea

Note: Peeble is a client-server application. The software works only if both the client and the server parts are installed and started properly.

Peeble got its name from a sci-fi novel by Stanislaw Lem where one main character is an intelligent advisor (the "peeble") that analyses the neighbourhood and provides its owner with useful advices. This applicartion simplifies this futuristic vision like the following: the application collects position data statistics of the user and allows the user to define "interesting places" in form of search terms. Then the client part (Android) synchronizes with the server and based on the statistics collected and the search terms specified, the server updates the client's "relevant places" database. When the user gets close to one of these "relevant places", he or she receives a warning.

This is an off-line, mobile-optimized version of the "find businesses" feature of Google Maps. The value added to Google Maps is based on the following assumptions.
Instead, the system tries to guess which locations may be relevant to the user by collecting and analyzing location data based on the assumption that many people move frequently along the same or similar routes. This allows the server to determine a relatively small set of "relevant places" that can be safely stored on the client and update by the server during the next synchronization session.

2. Limitations

The application provided here is just a prototype of the idea and is heavily simplified at places.

In particular:

3. Installation

Prerequisites:
Directories are denoted as follows:
First install the server. Enter %PEEBLEDIR%\server directory and edit the build.xml script so that the "home" property points to %PEEBLEDIR%\server and the "jbosshome" property points to %JBOSSDIR%. Now issue the "ant" command. The server package is installed in the the JBoss application server. Enter the %JBOSSDIR%\bin directory and execute run.bat.

Open a console window, go to %PEEBLEDIR%\tools and execute: "java PipeProxy localhost 8080 8088". This will launch a TCP piping proxy to the JBoss webserver. For reasons unknown to me, the emulator's HTTP client is not able to connect directly to JBoss webserver on port 8080, only if this piping proxy is inserted. This is clearly a mistery and I did not have time to investigate it. It may be related to the network interface configuration of my computer and may not occur elsewhere.

Now launch the Android emulator and install Peeble.apk from the %PEEBLEDIR%\client\bin directory. Enter the %PEEBLEDIR%\tools directory and execute the push_providers.bat script. This installs the example tracks as location providers.

Restart the emulator.

When the emulator restarts, launch the Peeble application and select "Configure ..." from the menu. Edit the IP address part of the sync server according to the IP address of your computer. Select the "barking1" location provider and press "Save".

4. Demo use case

The Peeble background service is started automatically at device (emulator) startup and is already analysing your location (this can be followed in the emulator log).

Note: on my emulator installation, the Phone application often crashes on startup. When it does, the emulator does not start the Peeble background service. There is a manual service start option in the Peeble menu to start the service. The behaviour is inconsistent, therefore I suspect that this is a fault in the emulator or the emulator installation on my machine.

Allow 1 minute for the "barking1" example route to complete. Meanwhile, select "Search terms ..." from the menu and add the  "supermarket" search term by using the "Add search term" menu command of the term manager activity. Wait the 1 minute for the track to complete and select "Synchronize ...". The server should react to the synchronization command by displaying debug messages in its console window. If you allow the route to continue, occassionally you will see "relevant places" to be displayed in the main window of the Peeble activity. If you enable warning popup in the configuration activity, these relevant places are displayed even if you navigate away from the Peeble UI. In order not to annoy the user with constant popups, each "relevant place" is displayed only once in the popup activity (but is always available on Peeble's main screen).

5. Organization of the software

The client-side application consists of Peeble's own content provider, its background service and a number of activities interacting with the user. The HighlightDisplay activity is the pop-up which is launched by the background service. The synchronization framework was also developed by me for an earlier project, this provides SyncML DS-based synchronization features for both the client and the server. The server is essentially a Java servlet.