How do I share in UWP (Windows 10)

Get help using Construct 2

Post » Fri Sep 16, 2016 11:37 am

Hi All!
@Ashley

I can use Windows Store object for this, but action Show Share UI - not work in Windows 10. How do I solve this problem?

Thank you
Last edited by radbrothers on Thu Nov 24, 2016 3:46 pm, edited 3 times in total.
B
12
S
3
Posts: 118
Reputation: 1,447

Post » Fri Sep 16, 2016 8:55 pm

Any solution? I found it https://msdn.microsoft.com/en-us/window ... share-data but I do not know how to implement it in Construct 2.
Last edited by radbrothers on Tue Sep 27, 2016 2:48 pm, edited 1 time in total.
B
12
S
3
Posts: 118
Reputation: 1,447

Post » Sat Sep 17, 2016 7:37 pm

bump
B
12
S
3
Posts: 118
Reputation: 1,447

Post » Tue Sep 27, 2016 2:47 pm

@Ashley Any help?
B
12
S
3
Posts: 118
Reputation: 1,447

Post » Wed Sep 28, 2016 5:02 pm

I don't think the necessary features to do this are supported yet.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,361

Post » Fri Sep 30, 2016 10:15 am

Hi @Ashley thank you for reply!

But how to another app on Window 10 Mobile called this Share dialog?

Image
B
12
S
3
Posts: 118
Reputation: 1,447

Post » Fri Nov 18, 2016 1:02 pm

Hi @Ashley

If i can't share screenshot from my Windows 10 mobile game, may be i can share text? Or sharing in UWP is not possible to implement with construct 2 now?

Thank you.
B
12
S
3
Posts: 118
Reputation: 1,447

Post » Tue Nov 22, 2016 5:49 pm

Hi @Ashley
I found solution for sharing on UWP Windows 10:

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

4. Export project for VS2015

And 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: 118
Reputation: 1,447

Post » Thu Nov 24, 2016 1:27 pm

@Ashley what you think about it?
B
12
S
3
Posts: 118
Reputation: 1,447


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests