Qt Android (Necessitas) soft-keys control volume.
To control application volume from Necessitas the following changes are required into QtActivity.java file import android.media.AudioManager; public class QtActivity extends Activity { private AudioManager audio; …….. } and add into public boolean onKeyDown(int keyCode, KeyEvent event) following code: public boolean onKeyDown(int keyCode, KeyEvent event) { switch (keyCode) { case KeyEvent.KEYCODE_VOLUME_UP: audio.adjustStreamVolume(AudioManager.STREAM_MUSIC, AudioManager.ADJUST_RAISE, AudioManager.FLAG_SHOW_UI); return true; [...]
Share and Enjoy
How to use Java from Qt/C++ in Necessitas
This steps are valid for Necessitas Alpha 3 Update 4 Add your java class inside org.kde.necessitas.origo (i will refer in this article as JavaManager.Java) Edit qtmain_android.cpp Replace static JavaVM *m_javaVM = NULL; static JNIEnv *m_env = NULL; static jobject objptr; with JavaVM *m_javaVM = NULL; static JNIEnv *m_env = NULL; jobject objptr; //new pointer to [...]
Share and Enjoy
Today’s News
Qt at Mobile World Congress – The popular new Nokia 808 PureView and more At Mobile World Congress in Barcelona, Nokia is promoting a new Qt opportunity. The flagship for developers in Nokia Qt powered device portfolio will soon be the new Nokia 808 PureView that was announced today. With the launch of this high-tech [...]
Share and Enjoy
Today’s News
New Qt SDK features updated Qt Creator, Qt 4.8 for desktop and new Qt mobility APIs A new Qt SDK, the Qt SDK 1.2, is now available for download, and it makes it easier than ever to create rich applications with improved performance. The new SDK includes the latest version of Qt Creator (2.4.1) as [...]