I've been testing the ANE file and reproduced what's causing Wakelocks with jobscheduler.
On the device, I've set sleepmode to 15seconds.
On the app, I've set : NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE, onDeactivate);
onDeactivate method scheduleTermintation after 20 seconds .
Just launch the app, wait for the device to go to sleep mode. After 20 seconds adb logs show:
Expected behaviour
The app should be killed and not restarted after.
Actual behaviour
App is active, device goes in sleep mode after 15 seconds, jobscheduler is set to terminate the app in 20 seconds, after 20 seconds job scheduler will restart the associated app.
Environment
- AIR SDK version: Air 32.0.0.48 and air 29.0.0.122
- Device OS: Android 7.0
- Device version: Samsung Experience 8.1
- Development IDE: Animate CC 2015.2
- Development OS: Windows 10
Logs
10-12 15:46:53.139 3781 10415 I ActivityManager: Process com.testapp (pid 16738) has died(194,1227)
10-12 15:46:53.140 3781 10415 W ActivityManager: Scheduling restart of crashed service com.testapp/com.distriqt.extension.jobscheduler.services.TerminateAppJobService in 1000ms
10-12 15:46:53.198 3781 10415 I ActivityManager: Start proc 17363:com.donut/u0a298 for activity com.testapp/.AppEntry
10-12 15:46:53.252 3781 22097 I ActivityManager: DSS on for com.donut and scale is 1.0
10-12 15:46:53.742 3781 3867 I ActivityManager: Displayed com.donut/.AppEntry: +446ms (total +563ms)