IFD:IOSDevI/Projects/Ringer

From Medien Wiki

Description

Ringer is a pilot project trying to enhance the behavior of the iPhone during an incoming call in terms of both the ringtone volume and the kind of vibration. The reader may remember the times of good old barren phones with their different profiles like 'Meeting', 'Asleep' or 'Garden'. Unfortunately, this feature is not available in the iPhone. There is a mode called "Do not disturb', which nevertheless only mutes the ringtone at all. An implementation of different profiles, the manually setting of them and thereby, adjusting the ringtone volume and vibration mode, is not challenging. Like all modern smartphones, the iPhone offers a wide range of different sensors that can be useful in this regard. With the help of these, the adjustment could be done fully automated in the background. This is what this project tries to achieve. In more detail, the following three sensors are tested for feasibility:

Microphone

The surrounding noise in the current environment is recorded right before the ringtone is about to be played. Then, the volume is adjusted automatically. The louder the environment, the more the volume is increased. To test this sensors, just tap on the microphone icon in the first tab to start recording and see the volume slider changing. In order to get a impression of the volume, either play the build-in song or choose one in your music library by tapping the menu button left to the stop button. Deactivate the microphone by tapping the symbol again (this is done automatically if a song is played).

Camera

A picture is taken with the front camera right before the vibration is about to be played. This is then analyzed with regard to dark pixels. If the image is considered to be dark, the app acts on the assumption that the iPhone is in a bag and thereby, an intensive vibration is played to make the user aware of the incoming call. In case the picture is bright, the phone probably lies on a desk and the front camera is facing the roof; thus, a short vibration is triggered. As a result, chattering phones on a desk disturbing all people around become obsolete. Take a picture by tapping the lens in the second tab and notice the selected vibration mode. You can get an impression of the corresponding mode by tapping the play button.

Accelerometer

Again, this sensor is activated right before the vibration is about to be played. The accelerometer checks the orientation of the iPhone. In case it lies on a desk, the orientation of the z-axis is either nearly -1 or +1 and as a result, a short vibration is played; otherwise, an intensive one. Tap the scales on the third tab to activate the accelerometer and see the axes adjusting to the current orientation. Deactivate the accelerometer by tapping the scales again (this is done automatically if a vibration is played).


Challenges

This project is only considered to be a pilot project, i.e. it is a non-system-wide application that acts on its own. Thereby, the overall feasibility of the different sensors is tested. In consequence, all three sensors offers great opportunities to enhance the iPhone's behavior. In a future project, they should be combined and be integrated in the system-wide ringtone. Nevertheless, the major challenge is related to privacy issues. Imagine an app that is allowed to record your environment or take a picture automatically...


Screenshots

Launch screen
Microphone for recording surrounding noise
MediaPicker for choosing song to be played
Camera for checking place (e.g. in a bag)
Accelerometer for checking place (e.g. on a desk)