You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2015/07/15 01:41:26 UTC
[1/3] cordova-windows git commit: add activationContext + activated
channel to windows
Repository: cordova-windows
Updated Branches:
refs/heads/master b4eb9d76b -> d28b61910
add activationContext + activated channel to windows
Project: http://git-wip-us.apache.org/repos/asf/cordova-windows/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-windows/commit/44c8ae76
Tree: http://git-wip-us.apache.org/repos/asf/cordova-windows/tree/44c8ae76
Diff: http://git-wip-us.apache.org/repos/asf/cordova-windows/diff/44c8ae76
Branch: refs/heads/master
Commit: 44c8ae76e4707f4db60ebc434cfb87d37a3195a4
Parents: 99107c6
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Fri Jun 26 17:56:07 2015 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Fri Jun 26 17:56:07 2015 -0700
----------------------------------------------------------------------
cordova-js-src/platform.js | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/44c8ae76/cordova-js-src/platform.js
----------------------------------------------------------------------
diff --git a/cordova-js-src/platform.js b/cordova-js-src/platform.js
index d41a395..149a794 100644
--- a/cordova-js-src/platform.js
+++ b/cordova-js-src/platform.js
@@ -30,6 +30,12 @@ module.exports = {
modulemapper = require('cordova/modulemapper');
modulemapper.clobbers('cordova/exec/proxy', 'cordova.commandProxy');
+
+ // we will make sure we get this channel, and remove this once
+ // other platforms catch up.
+ if(!channel.onActivated) {
+ channel.onActivated = cordova.addDocumentEventHandler('activated');)
+ }
channel.onNativeReady.fire();
var onWinJSReady = function () {
@@ -42,7 +48,18 @@ module.exports = {
cordova.fireDocumentEvent('resume',null,true);
};
+ // activation args are available via the activated event
+ // OR cordova.require('cordova/platform').activationContext
+ // activationContext:{type: actType, args: args};
+ var activationHandler = function (e) {
+ var args = e.detail.arguments;
+ var actType = e.detail.type;
+ platform.activationContext = { type: actType, args: args };
+ cordova.fireDocumentEvent('activated', platform.activationContext, true);
+ };
+
app.addEventListener("checkpoint", checkpointHandler);
+ app.addEventListener("activated", activationHandler, false);
Windows.UI.WebUI.WebUIApplication.addEventListener("resuming", resumingHandler, false);
app.start();
};
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[2/3] cordova-windows git commit: add same activated channel and
activationContext for non-browserify workflows
Posted by pu...@apache.org.
add same activated channel and activationContext for non-browserify workflows
Project: http://git-wip-us.apache.org/repos/asf/cordova-windows/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-windows/commit/007daf93
Tree: http://git-wip-us.apache.org/repos/asf/cordova-windows/tree/007daf93
Diff: http://git-wip-us.apache.org/repos/asf/cordova-windows/diff/007daf93
Branch: refs/heads/master
Commit: 007daf931bb67f5c1e4be6ae506941b640355b80
Parents: 44c8ae7
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Fri Jun 26 18:03:15 2015 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Fri Jun 26 18:03:15 2015 -0700
----------------------------------------------------------------------
template/www/cordova.js | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/007daf93/template/www/cordova.js
----------------------------------------------------------------------
diff --git a/template/www/cordova.js b/template/www/cordova.js
index 6f6743b..324dd24 100644
--- a/template/www/cordova.js
+++ b/template/www/cordova.js
@@ -1297,6 +1297,12 @@ module.exports = {
modulemapper = require('cordova/modulemapper');
modulemapper.clobbers('cordova/exec/proxy', 'cordova.commandProxy');
+
+ // we will make sure we get this channel, and remove this once
+ // other platforms catch up.
+ if(!channel.onActivated) {
+ channel.onActivated = cordova.addDocumentEventHandler('activated');)
+ }
channel.onNativeReady.fire();
var onWinJSReady = function () {
@@ -1309,7 +1315,18 @@ module.exports = {
cordova.fireDocumentEvent('resume',null,true);
};
+ // activation args are available via the activated event
+ // OR cordova.require('cordova/platform').activationContext
+ // activationContext:{type: actType, args: args};
+ var activationHandler = function (e) {
+ var args = e.detail.arguments;
+ var actType = e.detail.type;
+ platform.activationContext = { type: actType, args: args };
+ cordova.fireDocumentEvent('activated', platform.activationContext, true);
+ };
+
app.addEventListener("checkpoint", checkpointHandler);
+ app.addEventListener("activated", activationHandler, false);
Windows.UI.WebUI.WebUIApplication.addEventListener("resuming", resumingHandler, false);
app.start();
};
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[3/3] cordova-windows git commit: Merge branch 'CB-8674' of
https://github.com/purplecabbage/cordova-windows
Posted by pu...@apache.org.
Merge branch 'CB-8674' of https://github.com/purplecabbage/cordova-windows
Project: http://git-wip-us.apache.org/repos/asf/cordova-windows/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-windows/commit/d28b6191
Tree: http://git-wip-us.apache.org/repos/asf/cordova-windows/tree/d28b6191
Diff: http://git-wip-us.apache.org/repos/asf/cordova-windows/diff/d28b6191
Branch: refs/heads/master
Commit: d28b6191099a0b15325683db22b1a6698a8a8db1
Parents: b4eb9d7 007daf9
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Tue Jul 14 16:41:09 2015 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Tue Jul 14 16:41:09 2015 -0700
----------------------------------------------------------------------
cordova-js-src/platform.js | 17 +++++++++++++++++
template/www/cordova.js | 17 +++++++++++++++++
2 files changed, 34 insertions(+)
----------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org