In $$PWD/android/res/layout/ I have:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:keepScreenOn="true"
android:id="@+id/main"
/>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:keepScreenOn="true"
android:id="@+id/main"
/>
To copy to clipboard, switch view to plain text mode
and
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
To copy to clipboard, switch view to plain text mode
in AndroidManifest.xml.
I even tried add
QtNative.activity().getWindow().setFlags( WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON,
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON );
QtNative.activity().getWindow().setFlags( WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON,
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON );
To copy to clipboard, switch view to plain text mode
tо onCreate() method of class extending org.qtproject.qt5.android.bindings.QtActivity. Nothing helps.
Device goes sleep and locked in all cases. What can be wrong? What should I do to disable screen of and lock?
I test program in Android 6.0.
Bookmarks