incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fil...@apache.org
Subject [4/7] git commit: Fixing back button on Android
Date Thu, 19 Jan 2012 01:30:49 GMT
Fixing back button on Android

If you click the back button on Android it calls navigator.app.exitApp() which was the old
way of doing things. This will cause the app to close. Going back to setting the document
location.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/commit/efbebaac
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/tree/efbebaac
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/diff/efbebaac

Branch: refs/heads/master
Commit: efbebaac75508f478017f3750b64283289cebc55
Parents: 7ee79d4
Author: macdonst <simon.macdonald@gmail.com>
Authored: Wed Dec 14 17:41:13 2011 -0500
Committer: macdonst <simon.macdonald@gmail.com>
Committed: Wed Dec 14 17:41:16 2011 -0500

----------------------------------------------------------------------
 phonegap.js |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/blob/efbebaac/phonegap.js
----------------------------------------------------------------------
diff --git a/phonegap.js b/phonegap.js
index 3437a68..4af885a 100755
--- a/phonegap.js
+++ b/phonegap.js
@@ -2,10 +2,5 @@ document.write('<script type="text/javascript" charset="utf-8" src="../phonegap-
 document.write('<script type="text/javascript" charset="utf-8" src="phonegap-1.2.0.js"></script>');
 
 function backHome() {
-	if (device.platform.toLowerCase() == 'android') {
-		navigator.app.exitApp();
-	}
-	else {
-		document.location = "../index.html";
-	}
-}
\ No newline at end of file
+	document.location = "../index.html";
+}


Mime
View raw message