Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id EAB05200C7E for ; Tue, 23 May 2017 23:59:07 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E949B160BC3; Tue, 23 May 2017 21:59:07 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3B653160BA4 for ; Tue, 23 May 2017 23:59:07 +0200 (CEST) Received: (qmail 42405 invoked by uid 500); 23 May 2017 21:59:06 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 42394 invoked by uid 99); 23 May 2017 21:59:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 May 2017 21:59:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 0B19D18FCDD for ; Tue, 23 May 2017 21:59:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.001 X-Spam-Level: X-Spam-Status: No, score=-100.001 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id ahkhAwQd25Ce for ; Tue, 23 May 2017 21:59:05 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id CC4EE5F613 for ; Tue, 23 May 2017 21:59:04 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 63BB2E0373 for ; Tue, 23 May 2017 21:59:04 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 1F39721B56 for ; Tue, 23 May 2017 21:59:04 +0000 (UTC) Date: Tue, 23 May 2017 21:59:04 +0000 (UTC) From: "Grant Patterson (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CB-12846) WebView JS execution continues when app executes in background MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 23 May 2017 21:59:08 -0000 Grant Patterson created CB-12846: ------------------------------------ Summary: WebView JS execution continues when app executes in background Key: CB-12846 URL: https://issues.apache.org/jira/browse/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|https://github.com/happydenn/cordova-plugin-gimbal2] that integrates [a third-party SDK|https://docs.gimbal.com/iosdocs/v2/devguide.html] 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|https://developer.apple.com/library/content/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html]. 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: [https://stackoverflow.com/questions/44145031/stopping-background-javascript-activity-on-location-triggered-bluetooth-central] -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org For additional commands, e-mail: issues-help@cordova.apache.org