[
https://issues.apache.org/jira/browse/CB-11924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15545367#comment-15545367
]
Sebastien Lorber commented on CB-11924:
---------------------------------------
[~daserge] thanks for your response.
I'll make a project as soon as I can, but I'm not sure to understand why you
ask for an archived project.
The tests I've done are based on the following, which is basically the empty
cordova project:
{code}
cordova create shareTargetTest
cd shareTargetTest
cordova platform add https://github.com/apache/cordova-windows
{code}
If you type the 3 following commands, you will have exactly the same setting as
me (using cordova cli 6.3.1): it's the hello world cordova, empty project with
most simple html/js code at all. From there, replace content of the generated
file `www/js/index.js` with the code I pasted above (it just adds and call the
method setupShareTarget() after cordova is initialized)
About {code}args.setPromise(WinJS.UI.processAll());{code} I'm not using any
WinJS framework but I can tell by using remove webview debugging that
WinJS.UI.processAll() function is not undefined, so I guess it has been loaded
automatically by default.
Also note that I'm following this tutorial, which is initially for Windows8
(and the link pointing to Windows 10 doc seems broken):
https://msdn.microsoft.com/fr-fr/library/windows/apps/hh758301.aspx
What I'm trying to do: write the most simple code I can, on an empty Cordova
project, that succeed at sharing an Edge link to my App. So far, without
modifying initial cordova template (ie no WinJS usage at all) with most recent
windows platform, just adding a share target of type URI and sharing from Edge
to my app makes the emulator crash (also tested by checking checkbox saying my
app receives any kind of data, doesn't work either)
> Share target: sharing to cordova app makes the app open but crashes afterwards
> ------------------------------------------------------------------------------
>
> Key: CB-11924
> URL: https://issues.apache.org/jira/browse/CB-11924
> Project: Apache Cordova
> Issue Type: Bug
> Components: Windows
> Affects Versions: 4.4.2
> Environment: Windows 10, cordova cli 6.1.1, affects cordova platform
> 4.4.2, also current 4.5.0 dev branch.
> Reporter: Sebastien Lorber
>
> Steps to reproduce:
> ========================
> {code}
> cordova create shareTargetTest
> cd shareTargetTest
> cordova platform add https://github.com/apache/cordova-windows
> {code}
> In manifest, add Share Target of type URI, leading to the following XML:
> {code}
> <Extensions>
> <uap:Extension Category="windows.shareTarget">
> <uap:ShareTarget>
> <uap:DataFormat>URI</uap:DataFormat>
> </uap:ShareTarget>
> </uap:Extension>
> </Extensions>
> {code}
> Run Windows 10 emulator (also crashed on HP Elite X3 device)
> Open Edge browser on any page, and share page to HelloCordova app.
> The HelloCordova app opens, and after some seconds, the emulator crashes
> (WWAHost.exe fails with code = -1: don't know how to get more details
> unfortunatly)
> --------------------------------------------------------------------------
> Expected result:
> ========================
> I don't know if this has ever been done by anyone on a Cordova app, but I
> want to share a Edge link to my application. For Android/iOS, this means that
> the app should open, or resume itself, and call some JS callback.
> I tried to follow these Windows8 tutorials that still look relevant for
> Windows10 app, with no success.
> https://msdn.microsoft.com/en-us/library/windows/apps/hh758301.aspx
> It seems the "activated" callback never fires (weither it's declared in my
> app, or in cordova.js, at least I don't see anything in the console logs I've
> put everywhere).
> Can you tell me if I do anything wrong to achieve this usecase? thanks
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]