Necessitas/FAQ: Difference between revisions
Bog dan ro (talk | contribs) No edit summary |
Bog dan ro (talk | contribs) |
||
Line 12: | Line 12: | ||
For an example on how to use OpenSLES, see [http://community.kde.org/Necessitas/AndroidAudio here]. | For an example on how to use OpenSLES, see [http://community.kde.org/Necessitas/AndroidAudio here]. | ||
=== I don't like the android style plugin, can I switch back? === | === I don't like the android style plugin, can I switch back to the old one? === | ||
Yes you can. | Yes you can. | ||
There are two options way to do it: | There are two options way to do it: | ||
* if you want to use the old plugin with the android palette and fonts, then '''AFTER''' you create the application object set the style to plastique: '''QApplication::setStyle(new QPlastiqueStyle);''' | * if you want to use the old plugin with the android palette and fonts, then '''AFTER''' you create the application object set the style to plastique: '''QApplication::setStyle(new QPlastiqueStyle);''' | ||
* if you want to disable the new plugin completely (no palette and fonts) then you have edit the QtActivity.java and set '''QT_USE_ANDROID_NATIVE_STYLE''' environment variable to '''0'''. | * if you want to disable the new plugin completely (no palette and fonts) then you have edit the QtActivity.java and set '''QT_USE_ANDROID_NATIVE_STYLE''' environment variable to '''0'''. |
Latest revision as of 12:20, 15 November 2012
Can I call a C++ method from JAVA?
Yes, using JNI ! Check this example.
Can I call a JAVA method from C++?
Yes, using JNI ! Check this example.
I need Audio support
Sadly, currently Qt has no built in multimedia support ATM, if you need to play wav files, Android API-9 is coming with OpenSLES support, if you want to play other formats you can use Android MediaPlayer , check this example.
For an example on how to use OpenSLES, see here.
I don't like the android style plugin, can I switch back to the old one?
Yes you can. There are two options way to do it:
- if you want to use the old plugin with the android palette and fonts, then AFTER you create the application object set the style to plastique: QApplication::setStyle(new QPlastiqueStyle);
- if you want to disable the new plugin completely (no palette and fonts) then you have edit the QtActivity.java and set QT_USE_ANDROID_NATIVE_STYLE environment variable to 0.