the volume control buttons now dontrol the media volume directly

This commit is contained in:
Dorian Zedler 2018-07-24 15:24:15 +02:00
parent d705976d83
commit d5f70ccad4
3 changed files with 8 additions and 1 deletions

View file

@ -4,5 +4,6 @@ public class StayAwake extends org.qtproject.qt5.android.bindings.QtActivity {
public void onCreate(android.os.Bundle savedInstanceState){
super.onCreate(savedInstanceState);
this.getWindow().addFlags(android.view.WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
//this.getWindow().setVolumeControlStream(android.view.AudioManager.STREAM_MUSIC);
}
}

View file

@ -44,6 +44,9 @@ int main(int argc, char *argv[])
QGuiApplication app(argc, argv);
QAndroidJniObject jactivity=QtAndroid::androidActivity();
if(jactivity.isValid())
jactivity.callMethod<void>("setVolumeControlStream","(I)V",3);
connectToDatabase();

View file

@ -1,4 +1,8 @@
QT += quick sql
android {
QT += androidextras
}
CONFIG += c++11
# The following define makes your compiler emit warnings if you use
@ -42,7 +46,6 @@ DISTFILES += \
android {
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android-sources
Qt += androidextras
}
HEADERS += \