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.
I’ve set the following permissions:
android.permission.INTERNET android.permission.WRITE_EXTERNAL_STORAGE android.permission.VIBRATE
However I still receive a segmentation fault.
According to this:
it’s not one of the platforms that is feature complete at the current time.
The API documentation for
QFeedbackHapticsEffect suggests that
duration should be greater than
fadeTime. And, of course, stopping right after it starts probably isn’t what you want, but hopefully that doesn’t cause a seg fault. Does
actuator() return something useful? For that matter, does
QFeedbackActuator::actuators() give you a non-empty list?
I had the same Problem and did post a bug report with more details (still without reply) to
It seems to be a problem in the Qt Mobility library for Android which probably can be fixed easily for someone who does compile his own library (I didn’t do that yet).