cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesse MacFadyen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-8776) Should pass launch params
Date Wed, 01 Apr 2015 08:46:52 GMT

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

Jesse MacFadyen commented on CB-8776:
-------------------------------------

Here's a workaround for the case posted on StackOverflow.
{code}

// In MainPage.cs in CordovaView_Loaded, add an event delegate.
CordovaView.CordovaBrowser.LoadCompleted += CordovaBrowser_LoadCompleted;

// and add the handler
void CordovaBrowser_LoadCompleted(object sender, System.Windows.Navigation.NavigationEventArgs
e)
{
    if (NavigationContext.QueryString.ContainsKey("NavigatedFrom"))
    {
        if (NavigationContext.QueryString["NavigatedFrom"] == "toast")
        {
            CordovaView.CordovaBrowser.InvokeScript("eval", new string[] { 
                "document.addEventListener('deviceready',function(){alert('boo')});"
            });
        }
    }
}
{code}

> Should pass launch params
> -------------------------
>
>                 Key: CB-8776
>                 URL: https://issues.apache.org/jira/browse/CB-8776
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: WP8
>    Affects Versions: 3.8.0
>            Reporter: Jesse MacFadyen
>            Assignee: Jesse MacFadyen
>
> WP8 apps should have a way of receiving the launch params in Javascript.
> Some apps will want to perform different actions if they are launched by a toast notification.
> StackOverflow question here: http://stackoverflow.com/questions/29352208/cordova-wp8-push-notifications-callback



--
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