cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grant Patterson (JIRA)" <>
Subject [jira] [Created] (CB-12846) WebView JS execution continues when app executes in background
Date Tue, 23 May 2017 21:59:04 GMT
Grant Patterson created CB-12846:

             Summary: WebView JS execution continues when app executes in background
                 Key: CB-12846
             Project: Apache Cordova
          Issue Type: Bug
          Components: cordova-ios
    Affects Versions: cordova-ios@4.3.1
            Reporter: Grant Patterson

I'm using a [Cordova plugin|] that integrates
[a third-party SDK|] to listen for bluetooth
beacon sighting events. As expected, my app is allowed to run for 10 seconds in the background
with the [bluetooth-central UIBackgroundMode|].
Once the necessary processing is completed, the JS event loop runs until the 10-second window
closes. Because beacon sightings happen as frequently as several per second, the app runs
in the background constantly, killing the user's battery. I can setInterval() in JS with a
1000ms interval and it runs successfully every time; my Angular app runs $digest cycles in
the background which are unnecessary and quite expensive.

I think I need a way for the native plugin code to relinquish execution and return the app
to the background.

StackOverflow: []

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message