[Question] About Windows Store object again

0 favourites
  • 1 posts
From the Asset Store
Get Ready for the New Wave of "Bottom Screen" Games!
  • 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:

     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();[/code:1bkdsz4j]
    
    [b]2.[/b] Import share.js in project.
    [b]3.[/b] Browser object -> Execute Javascript:
    
    [code:1bkdsz4j]var js = document.createElement('script');
    js.type = 'text/javascript'; 
    js.src = 'share.js';
    document.body.appendChild(js);[/code:1bkdsz4j]
    
    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?
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)