0 Favourites

[Question] About Windows Store object again

  • 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?
  • Construct 3

    Buy Construct 3

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

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