the volume control buttons now dontrol the media volume directly
This commit is contained in:
parent
d705976d83
commit
d5f70ccad4
3 changed files with 8 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
3
main.cpp
3
main.cpp
|
@ -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();
|
||||
|
||||
|
|
|
@ -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 += \
|
||||
|
|
Reference in a new issue