BenderCatch is an Android App developed by Raffaele De Falco that detects if the user moves the device after a period of inactivity. If events (like missed calls, text messages or emails) happened during that inactivity time, the app can launch various notifications that don’t require the user to watch at the phone. The program can detect if the device is shaken too, and give the user a more precise feedback.

App target

BenderCatch will help users that usually leave their phone or tablet, come back later and pick up the device to go somewhere. Once the device is moved, if any event happened during the inactivity period, sensorial feedbacks are launched to make the user aware of missed calls, text messages or e-mails.

Project details

The project is now split in two main parts.

Bender Library

The Library itself is composed by two Controllers, one for Motion Sensing and one for Shake Detecting. The applications using the library must implement the MotionListener interface and registers using the setListener(…) method of the Controller, then starts sending SensorEvents using the record(…) method. If motion or shake are detected, the Controller triggers the motionHappened(…) method, with an integer describing the type of gesture.

Bender Catch

The App uses the library to provide the functions described above. The BenderLogic class uses a synchronized method to perform the action, passes the SensorEvents to the appropriate Controller and launches notifications if motion or shake are detected, based on the user preferences and on the events happened in the inactivity time.

Beta test

Second stage of beta testing is in progress.

Second stage: program usage

Testers can download a beta version of the App and install it in any Android device (if equipped with accelerometer). It’s required to uninstall the old version of the app, since it was unsigned and cannot be upgraded.

Main steps to use the App are:

1) press the menu button, select the Feedback submenu and enable some sort of feedback; suggested are "Vibrate" for motion and "Voice" or "Rattle" for shake; it’s NOT advised to enable more than one feedback per event, even if it’s technically possible;

2) drag the "inactivity" bar on the main screen and select a suitable time; for testing purpose the value of 10/20 seconds is advised, for general use it’s suggested to choose at least 5 minutes;

3) for testing it’s advised to enable "Fake user data" in advanced options, otherwise no feedback will occur if there isn’t any event;

4) start the service and try to leave the device at rest for some time, then take it and see if a feedback occurs; after the first feedback, the device tries to detect a shake for some seconds; if shake occurs, other notifications are triggered;

5) report any problem, question or suggestion to Raffaele De Falco; if the App doesn’t detect correctly motion or shake, I can suggest how to change "advanced options".

Beta testing results

First impressions are:

  • Huawei Ideos / Android 2.2 works with "Medium" and "Sensible" presets, doesn’t work when in standby mode, detects shake on X and Y axis;
  • Samsung Galaxy S / Android 2.2 works with "Sensible" and "Paranoid" presets, works even in standby mode, detects shake only on X axis;

First stage: data collection

Testers can download a beta version of the App and install in any Android device. The included "Bender Recorder" application can record sensor data and save them into a .CSV file, this file should be sent via e-mail to Raffaele De Falco for further analysis.

At the moment, the developer needs recordings in four usage scenarios:

1) device at rest (i.e. on a table)

2) user taking the device

3) user shaking the device

4) user putting the device in standby using the button, then powering it up again

(many thanks to Angelo Santarella, Luca Viscito, Luca Vicidomini, Nello Sorrentino, Emidio Bianco, Ada Mancuso for their help in data collecting)

Data collection results

After rigorous data collecting and analysis, based on sensors from 6 (and counting…) different devices with different Android version, from 2.2 to 2.3.4, some conclusions seem already acceptable:

  • Nearly all devices have similar accelerometer raw values, sum for all three axis is between 50 and 100; only Samsung Corby provided weird values around 500, probably due to wrong mass calculation, since according to Android Development docs the acceleration is calculated from Ad = – ∑Fs / mass;
  • The initial "imposed threshold" value of 5.0 for motion detection, based on Huawei Ideos data, is generally acceptable for other devices except Samsung Corby; however it can be fully customized, and eventually reduced for other devices like Samsung Galaxy / Galaxy II which have slightly lower sensor values;
  • Shakes performed by users other than the developer seem to match the pattern initially detected: most of the up and down values are on the X-axis, sometimes involving Y and Z; the proposed algorithm is to be considered valid;
  • The "Sensor Standby Bug" detected on 2.2 version of Android seems to be fixed in devices based on version 2.3; only exception is LG Optimus One with a 2.3.4 unofficial version, most likely due to a porting without rewriting of the hardware drivers from the older 2.2 official version.

Source Code

This project is also hosted on SourceForge here: BenderCatch on SourceForge The code can be checked out via SVN.

The code is licensed under the GNU Lesser General Public License v3 (LGPLv3)