Search code examples
xamarin.formsxamarin.androidxamarin.iosxamarin.essentials

How to evaluate the result of Share.RequestAsync in Xamarin forms


Iam using Xamarin Share to share a URI. Is there anyway to evaluate the result if it was shared or cancelled. From the share dialog the user either share or cancel sharing.

public async Task ShareUri(string uri)
    {
        await Share.RequestAsync(new ShareTextRequest
            {
                Uri = uri,
                Title = "Share Web Link"
            });
    }

Solution

  • No, there is no way to do this as that function just returns a void.

    If you look at native development too, there's no way to get that information on either platform due to privacy reasons (unless the device is jailbroken)