Using JNI
-
Hi
Syntax should be the same.
https://www.somacon.com/p125.php
For the OR part but are you talking about the actual pm.newWakeLock call or
simply the
PowerManager.SCREEN_DIM_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP ? -
java.lang.NoSuchFieldError: no "I" field "SCREEN_DIM_WAKE_LOCK|ACQUIRE_CAUSES_WAKEUP" in class "Landroid/os/PowerManager;" or its superclasses
-
I am using QAndroidJniObject in order to call power manager and set cpu flags. The code is the above code that i've posted. Look the initial post.
-
@NickV
For me something is not clear, did you already try the following or not?!jint levelAndFlags = QAndroidJniObject::getStaticField<jint>("android/os/PowerManager","SCREEN_DIM_WAKE_LOCK") | QAndroidJniObject::getStaticField<jint>("android/os/PowerManager","ACQUIRE_CAUSES_WAKEUP");