cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-10653) Universal Windows Platform -- activationContext is incomplete
Date Mon, 02 May 2016 17:52:12 GMT

    [ https://issues.apache.org/jira/browse/CB-10653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15267081#comment-15267081
] 

ASF GitHub Bot commented on CB-10653:
-------------------------------------

Github user rakatyal commented on a diff in the pull request:

    https://github.com/apache/cordova-windows/pull/173#discussion_r61774665
  
    --- Diff: cordova-js-src/platform.js ---
    @@ -56,9 +57,10 @@ module.exports = {
                 // 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 };
    +                // Making all the details available as activationContext
    +                platform.activationContext = utils.clone(e.detail); 
    +                platform.activationContext.args = e.detail.arguments;       /* for backwards
compatibility */
    +                platform.activationContext.actType = e.detail.type;         /* for backwards
compatibility */
    --- End diff --
    
    That's right! Corrected.


> Universal Windows Platform -- activationContext is incomplete
> -------------------------------------------------------------
>
>                 Key: CB-10653
>                 URL: https://issues.apache.org/jira/browse/CB-10653
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: Windows
>         Environment: Windows 10, Windows 10 Phone
>            Reporter: Adam Fourney
>            Assignee: Raghav Katyal
>            Priority: Minor
>              Labels: easyfix
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> CB-8674 modified cordova-js-src/platform.js to capture the application's onactivated
event, and record the details in the platform.activationContext instance. 
> Unfortunately, CB-8674 covers only a few of the 12 types of UWP activation events. As
an example, if an app is activated by a Cortana voice command, the details are missed. See
here for more details: https://msdn.microsoft.com/en-us/library/windows/apps/br212679.aspx
> The proposed fix is to change:
> 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);
> };
> To be: 
>             var activationHandler = function (e) {
>                 platform.activationContext = utils.clone(e.detail);
>                 platform.activationContext.args = e.detail.arguments; // Backwards compatibility
>                 cordova.fireDocumentEvent('activated', platform.activationContext, true);
>             };
> This also means that platform.js should require("cordova/utils")



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message