Necessitas/FAQ: Difference between revisions

From KDE Community Wiki
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 9: Line 9:
=== I need Audio support ===
=== 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 [http://www.khronos.org/opensles/ OpenSLES] support, if you want to play other formats you can use Android MediaPlayer , check [http://community.kde.org/Necessitas/JNI this] example.
Sadly, currently Qt  has no built in multimedia support ATM, if you need to play wav files, Android API-9 is coming with [http://www.khronos.org/opensles/ OpenSLES] support, if you want to play other formats you can use Android MediaPlayer , check [http://community.kde.org/Necessitas/JNI this] example.
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 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'''.

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.