0

I am using the method below in order to share uri's from my app.

ShareTextRequest share = new ShareTextRequest
{
    Uri = uri,
    Title = "Share Link"
};

await Share.RequestAsync(share);

All is working fine on both Android and iOS, however I am running into an issue as I would like to track and log to what applications the users are sharing the link, for security purposes as per company policy.

An example of the log would be something like;

{
   'UserId': '999',
   'Link': 'http://example.com',
   'SharedTo': 'Facebook',
   'SharedOn': '29/08/2019 11:00.000'
}

Would it be possible to use a callback method for example, where I can return the name of the application the link was shared to?

I have already tried accessing any returns of the function but it returns void.

My only other option might be to create a custom share functionality without using the native options.

skolldev
  • 1,179
  • 9
  • 19
  • 1
    On Android, you would need to create your own share dialog/actionsheet/... i.e. https://stackoverflow.com/questions/7495909/how-to-know-which-intent-is-selected-in-intent-action-send Not sure about iOS as I never found a way that did not violate AppStore policy (i.e. private APIs), maybe someone else has... – SushiHangover Aug 30 '19 at 08:05
  • Ah I thought as much. Still trying to find a way but probably will have to create a custom renderer. Thanks – Steve Grixti Aug 30 '19 at 08:20

0 Answers0