QtMobility 1.1/1.2 doesn't work Haptics/Feedback in Maemo 5 (n900)
-
It certainly should work. When you say that it doesn't work, have you tried the example applications or are you attempting to build your own application from scratch? On the n900 there should be an "immersion" backend plugin built, which provides the functionality offered by the API. Also, in certain profiles the vibration functionality will not be available (so please make sure you try it with the "general" profile if you're having problems).
Please describe:
- what you're doing exactly
- what you expected to see
- what you did instead see (compile error? runtime error? nothing happening?)
Hopefully that will give us a starting point to solving the problem.
Cheers,
Chris. -
I try this from QML:
@
HapticsEffect {
id: rumbleEffect
attackIntensity: 0.0
attackTime: 250
intensity: 1.0
duration: 100
fadeTime: 250
fadeIntensity: 0.0
running: true
}@also i try this from C++:
@QFeedbackEffect::playThemeEffect(QFeedbackEffect::ThemeBasic/and QFeedbackEffect::ThemeBasicButton/)@
I expecting error in console or anything vibration.
Code below returns true
@qDebug() << QSystemInfo().hasFeatureSupported(QSystemInfo::HapticsFeature);@My profile is Generic. Hot to determine installed Immersion plugin?
I found this "page":http://developer.qt.nokia.com/wiki/Feedback_API where says, what for Maemo 5 plugin from MeeGo doesn't work... But in Maemo 5 there DBus and vibrator, and i must write code system depended for that.
P.S.: about ".ifr" (Immersion Force Resource) files. Do you know any 3rd-party freeware software for create this?
-
Run your application with QT_DEBUG_PLUGINS=1 ./yourapp
This should give some information about which plugins are installed. The immersion plugin should be called libqtfeedback_immersion.so, I believe.I just read that devnet wiki, and you're right: it says that the meego backend won't run on maemo5. This is true, however the immersion backend should work on maemo5, I believe. The meego backend provides theme effects, while the immersion backend provides custom effects. It may very well be that theme effects don't work on maemo5, but custom effects do.
Have you tried running the example applications which come with Qt Mobility? The hapticsquare application in particular is a good one to run. Some backends don't support theme effects, but only support custom effects, while other backends don't support custom effects but to support theme effects - therefore it's important to try both (which the example does).
Regarding .ifr's, no I'm not aware of any such software.
Cheers,
Chris. -
QT_DEBUG_PLUGINS=1 nothing change, i always see this strings when app started:
@loaded the Generic plugin
loaded the N900 plugin@No, i don't have libqtfeedback_immersion.so file on device. I think qtm12 package just don't have this plugin. Also i can't compile hapticsquare example, because current QtSDK 1.1.2 doesn't have this. Default memo 5 toolchain have only QtMobility 1.0.2 installed, who don't have feedback api. I don't know how to update QtMobility to 1.2 version on Windows for Maemo 5. Sorry, my mistake. Must be i set wrong target platform to Simulator, when try compile C++ code, and when try to compile for maemo just get compilation error, and forgot about this. So i can try only test feedback on QML.
-
Ah, ok - you might have more luck using the community-maintained Qt Mobility packages (from extras). Alternatively, build and deploy mobility yourself using scratchbox. If you don't have at least Qt Mobility 1.1 installed on your Maemo5 device, you certainly won't have the libqtfeedback_immersion.so plugin available, and the hapticsquare example will not run at all (as it requires the libqtfeedback.so etc Mobility libs).
Cheers,
Chris.Mobility on n900 info:
http://talk.maemo.org/showthread.php?t=68123 -- mobility 1.2
http://talk.maemo.org/showthread.php?t=67588 -- mobility 1.1 -
I already have installed 1.0.2, 1.1.0 and 1.2.0 versions on my n900. But I not found libqtfeedback_immersion.so on filesystem. Which path I need see?
I can't use scratchbox, I use QtSDK for Windows. It SDK have only QtMobility 1.0.2 version for maemo 5 and I don't know how to build QtMobility 1.2.0 from Windows XP for Maemo 5 for run application on n900.
I install qt-mobility-12-examples on n900, but this package don't have few examples included hapticsquare.
-
Hi,
It looks like this might be a packaging bug in the QtMobility 1.2 package. The QA engineer I spoke to said that the ./debian/libqtm-feedback.install file in that package does not look correct, and that it should be updated.
(I believe it should be something like:
usr/lib/libQtFeedback.so.*
opt/lib/libQtFeedback.so.*
opt/lib/qt4/imports/QtMobility/feedback/
usr/lib/qt4/imports/QtMobility/feedback/usr/lib/qt4/plugins/feedback/libqtfeedback_immersion*.so
opt/lib/qt4/plugins/feedback/libqtfeedback_immersion*.sousr/lib/qt4/plugins/feedback/libqtfeedback_mmk.so
opt/lib/qt4/plugins/feedback/libqtfeedback_mmk.soand that debian/libqtm-feedback-dev.install should be something like:
#usr/lib/QtFeedback.pc usr/lib/pkgconfig/
usr/include/qt4/QtFeedback
usr/lib/libQtFeedback.sobut I could be wrong).
If you contact the community package maintainer, hopefully they'll be able to provide updated packages. It's possible that all of the .install files need to be updated, although I may be wrong.
Cheers,
Chris.