Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9D61A17E92 for ; Sat, 25 Oct 2014 01:26:21 +0000 (UTC) Received: (qmail 9332 invoked by uid 500); 25 Oct 2014 01:26:21 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 9269 invoked by uid 500); 25 Oct 2014 01:26:21 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 9000 invoked by uid 99); 25 Oct 2014 01:26:21 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Oct 2014 01:26:21 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 2BA91812E95; Sat, 25 Oct 2014 01:26:21 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: agrieve@apache.org To: commits@cordova.apache.org Date: Sat, 25 Oct 2014 01:26:34 -0000 Message-Id: <6bce7bd9e3574ca7bdacaad4b19671ec@git.apache.org> In-Reply-To: <302bc196a8ec4dd8aaf38fe44eb72662@git.apache.org> References: <302bc196a8ec4dd8aaf38fe44eb72662@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [16/17] git commit: Enable cordova-android's App plugin (e.g. navigator.app.exitApp()) Enable cordova-android's App plugin (e.g. navigator.app.exitApp()) fixes MobileChromeApps/mobile-chrome-apps#383 Project: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/commit/dc55639a Tree: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/tree/dc55639a Diff: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/diff/dc55639a Branch: refs/heads/master Commit: dc55639a0d1c0454097024c6f94ef18ef173101b Parents: 7f7279a Author: Andrew Grieve Authored: Fri Oct 24 09:25:11 2014 -0400 Committer: Andrew Grieve Committed: Fri Oct 24 21:26:07 2014 -0400 ---------------------------------------------------------------------- AppHarnessUI/android/AppHarnessUI.java | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-app-harness/blob/dc55639a/AppHarnessUI/android/AppHarnessUI.java ---------------------------------------------------------------------- diff --git a/AppHarnessUI/android/AppHarnessUI.java b/AppHarnessUI/android/AppHarnessUI.java index 48dd225..2975bf5 100644 --- a/AppHarnessUI/android/AppHarnessUI.java +++ b/AppHarnessUI/android/AppHarnessUI.java @@ -238,6 +238,9 @@ public class AppHarnessUI extends CordovaPlugin { } } slaveWebView.getPluginManager().setPluginEntries(pluginEntries); + // This is added by cordova-android in code, so we need to re-add it likewise. + // Note that we re-route navigator.app.exitApp() in JS to close the webview rather than close the Activity. + slaveWebView.getPluginManager().addService("App", "org.apache.cordova.CoreAndroid"); } private void initWebView(final CustomCordovaWebView newWebView, Set pluginIdWhitelist) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org For additional commands, e-mail: commits-help@cordova.apache.org