6
votes
var dataTransferManager = Windows.ApplicationModel.DataTransfer.DataTransferManager.getForCurrentView();
dataTransferManager.addEventListener("datarequested", function (e) {
  var request = e.request;
  request.data.properties.title = "Share Link Example";
  request.data.properties.description = "A demonstration that shows how to add a link (URI) to share.";
  request.data.setUri(new Windows.Foundation.Uri("http://www.google.com"));
});

For some reason, if I click on the Share charm, it just hangs on "Getting info from GodVine" (GodVine is the name of my app). It used to work, then all the sudden stopped working. Am I doing something wrong?

2

2 Answers

13
votes

I suspect you stopped a debug session while on a breakpoint inside the datarequested handler. If you stop a debug session inside of the datarequested handler, there is a bug that breaks the Share Broker. The "easiest" way to reset thing is use Task Manager to stop and restart explorer.exe.

0
votes

on an elevated command prompt - taskkill also comes handy.

- taskkill /F /IM explorer.exe
- start explorer.exe