KeepRunning preference for Android 7.0 (Nougat)

30 views
Skip to first unread message

Michael Capulong

unread,
Nov 7, 2016, 8:19:21 PM11/7/16
to phonegap
I have an app built with cordova-6.3.1 and cordova-android-5.2.2. The callbacks for setInterval and setTimeout are being executed in the background without issues on our Samsung S5 and Nexus 5 (both running Android 6.0).

However, the javascript timers seem to be suspended on Nexus 5X running Android 7.0.

I have tried removing calls to WebView.onPause() and WebView.pauseTimers() but setInterval and setTimeout still won't work in the background.

I have manually whitelisted the app from Doze but it did not help.

Is there any workaround to allow setInterval and setTimeout to work in the background for Nougat?


Kerri Shotts

unread,
Nov 9, 2016, 7:40:14 AM11/9/16
to phonegap
What plugins do you have installed?

On Monday, November 7, 2016 at 7:19:21 PM UTC-6, Michael Capulong wrote:

Kerri Shotts

unread,
Nov 9, 2016, 7:41:13 AM11/9/16
to phonegap

Kerri Shotts

unread,
Nov 9, 2016, 7:41:13 AM11/9/16
to phonegap

Kerri Shotts

unread,
Nov 9, 2016, 7:41:40 AM11/9/16
to phonegap
Could you share what plugins you have installed? It might also help to see your config.xml file (minus identifying/secret information).

Kerri Shotts

unread,
Nov 9, 2016, 7:43:13 AM11/9/16
to phonegap
Also -- apologies for any duplicate posts -- my Internet glitched for a second and my replies got emailed but not posted to Google. Odd.
Reply all
Reply to author
Forward
0 new messages