Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt Haptic Feedback on android

I'm attempting to get my device to rumble but I'm having very little luck. My environment is HTC Sensation Android 2.3.3 API 10. Using Necessitas Qt Creater as my IDE.

Does nothing at all:

QFeedbackHapticsEffect::playThemeEffect( QFeedbackHapticsEffect::ThemeBasic );

Crashes my application:

QFeedbackHapticsEffect rumble;

rumble.setAttackIntensity(0.0);
rumble.setAttackTime(250);
rumble.setIntensity(1.0);
rumble.setDuration(100);
rumble.setFadeTime(250);
rumble.setFadeIntensity(0.0);

rumble.start();

rumble.stop();

I've specified my .pro file with the following

CONFIG += mobility
MOBILITY += feedback

and I'm using QTM_USE_NAMESPACE with the required headers included.

Edit:

I've set the following permissions:

android.permission.INTERNET
android.permission.WRITE_EXTERNAL_STORAGE
android.permission.VIBRATE

However I still receive a segmentation fault.

like image 866
Ben Crowhurst Avatar asked Feb 14 '12 12:02

Ben Crowhurst


People also ask

Do Androids have haptic feedback?

Scroll about halfway down the screen and Tap Haptic feedback. A green checkmark means that Haptic Feedback is enabled. A grayed checkmark means that Haptic Feedback is disabled.

How do I turn off tactile feedback on Android?

Scroll down and tap Accessibility. Scroll down to the Interaction controls section and select Vibration and haptic strength. On the vibration screen select the vibration you would like to turn off. Tap either Ring vibration, Notification vibration or Touch feedback.

What does haptic feedback mean on Android?

Haptic feedback is the use of touch to communicate with users. Most people know the feeling of a vibration in a mobile phone or the rumble in a game controller – but haptic feedback is much more than that. Robert Blenkinsopp, VP Engineering at Ultraleap, explains why.


1 Answers

According to this:

http://doc.qt.nokia.com/qtmobility-1.2/index.html#platform-compatibility

it's not one of the platforms that is feature complete at the current time.

like image 181
Paul McCabe Avatar answered Oct 12 '22 11:10

Paul McCabe