Another solution is to try using your own lockscreen (thanks to this useful post :
https://www.b4x.com/android/forum/t...reen-with-just-5-lines-of-code.43327/#content). From my experience the mobiles where the PartialLock is not working were using "special" lockscreens which manage the mobile's battery saving policy. Perhaps could you try too.
A question only because I saw the "p.PartialLock" from inside the ScreenOff event. Have you already tried to put it in Activity_Resume ?
I have the p.PartialLock in the Activity_Resume.
What I am trying is to wake up the device with a shake.
This is my test application.
Press start service to start the service that monitor every 10seconds the accelerometer for a shake and wake up the device.
This is the log:
PackageAdded: package:b4a.example
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
06/12/2015 16:29:52 : Activity Resume
Partial wakeLock already held.
06/12/2015 16:30:05 : Start Click
** Service (servicem) Create **
ACCELEROMETER MaxValue = 19.613300323486328
06/12/2015 16:30:05 : Create Service
** Service (servicem) Start **
06/12/2015 16:30:05 : Start Service
06/12/2015 16:30:05 : BatteryChanged: Level = 84, Scale = 100, Plugged = false
06/12/2015 16:30:10 : timer1 tick
** Service (servicem) Start **
06/12/2015 16:30:15 : Start Service
WakeLock already held.
WakeLock already held.
WakeLock already held.
WakeLock already held.
WakeLock already held.
WakeLock already held.
06/12/2015 16:30:20 : timer1 tick
06/12/2015 16:30:25 : BatteryChanged: Level = 84, Scale = 100, Plugged = false
** Service (servicem) Start **
06/12/2015 16:30:25 : Start Service
06/12/2015 16:30:30 : timer1 tick
No wakelock.
** Service (servicem) Start **
06/12/2015 16:30:35 : Start Service
** Activity (main) Pause, UserClosed = false **
06/12/2015 16:30:35 : Activity Pause
06/12/2015 16:30:35 : Screen is OFF
06/12/2015 16:30:40 : timer1 tick
No wakelock.
** Service (servicem) Start **
06/12/2015 16:30:45 : Start Service
06/12/2015 16:30:50 : timer1 tick
No wakelock.
** Service (servicem) Start **
06/12/2015 16:30:55 : Start Service
** Activity (main) Resume **
06/12/2015 16:30:55 : Activity Resume
Partial wakeLock already held.
06/12/2015 16:30:55 : Screen is ON
WakeLock already held.
WakeLock already held.
WakeLock already held.
WakeLock already held.
06/12/2015 16:31:00 : timer1 tick
** Activity (main) Resume **