[Question] About Windows Store object again

Discussion and feedback on Construct 2

Post » Tue Dec 06, 2016 9:02 am

Hi all!
@Ashley

In Constrcut2 we can't use Windows Store action Show Share UI for Windows 10 UWP. But I use this method and it work:

1. I create file share.js with code:

Code: Select all
 var dataTransferManager = Windows.ApplicationModel.DataTransfer.DataTransferManager.getForCurrentView();
        dataTransferManager.addEventListener("datarequested", function (e) {
            var request = e.request;
            request.data.properties.title = "Your title";
            request.data.setText("Your text");
        });
        Windows.ApplicationModel.DataTransfer.DataTransferManager.showShareUI();


2. Import share.js in project.
3. Browser object -> Execute Javascript:

Code: Select all
var js = document.createElement('script');
js.type = 'text/javascript';
js.src = 'share.js';
document.body.appendChild(js);


It work on windows 10 and windows 10 mobile - Share UI is shown and I can choose any social network in which I want to share. Why Windows Store object can't do that?
B
12
S
3
Posts: 115
Reputation: 1,434

Return to Construct 2 General

Who is online

Users browsing this forum: JesusJ and 14 guests