translate

AndroidVibrationModule


P4A - AndroidVibrationModule

An Android Library that offers a mechanism for easily adding vibration feedback to Android applications.

The source code contains two main directories:

  1. P4A_AndroidVibrationModule: This includes the source code of the P4A_AndroidVibrationModule

  2. MyTestApp: This includes the source code of a sample application that uses the P4A_AndroidVibrationModule

Main features

The main features of the P4A AndroidVibrationModule include the following:

Usage instructions

A complete example showing how the P4A AndroidVibrationModule can be used to add vibration vibration feedback to various GUI components of an Android application can be found here.

Adding haptic feedback in a GUI component (e.g. button, etc.) can be achieved using the P4A AndroidVibrationModule by a simple line of code:

P4A_VibrationModule.getInstance(this).addVibrationFeedbackOnEventListener(P4A_VibrationModule.ON_CLICK, findViewById(R.id.button1), 2000);

The example above adds vibration feedback to "button1". In particular, when this button is clicked, it vibrates for 2 seconds.

Further examples can be found here.

Funding Acknowledgement

The research leading to these results has received funding from the European Union's Seventh Framework Programme (FP7) under grant agreement No.610510

Rating

ABOUT

LESS COMMENTS

MESSAGE REVIEW OK

Ok