Xamarin.Plugins icon indicating copy to clipboard operation
Xamarin.Plugins copied to clipboard

Reporting SMS delivery result for SendSmsInBackground method for Android via an event.

Open soroshsabz opened this issue 4 years ago • 5 comments

soroshsabz avatar Jul 30 '20 20:07 soroshsabz

Usage:

Before sending the SMS, subscribe to delivery result event:

by a delegate:

CrossMessaging.Current.SmsMessenger.OnSmsDeliveryResult += delegate(bool isSuccessful)
{
    // our code
};

By a method:

private void OnSmsDeliveryResult(bool isSuccessful)
{
    // our code
}

CrossMessaging.Current.SmsMessenger.OnSmsDeliveryResult += OnSmsDeliveryResult;

And then send the SMS: CrossMessaging.Current.SmsMessenger.SendSmsInBackground(recipient, message);

VahidShir avatar Aug 20 '20 14:08 VahidShir

Hi

How can I get this change but still using the nuget package ?

Thanks

snice1981 avatar Oct 13 '21 07:10 snice1981

For what you want, this repository's author would need to accept this PR and merge it to master and publish a new release. But sadly as this repository is no longer maintained you can fork it and publish your own Nuget.

VahidShir avatar Oct 13 '21 18:10 VahidShir

Thank you @VahidShir for your reply. For now, I just compiled it on my local computer and referenced it locally. I'll see if it's better to push it as personal nuget package.

snice1981 avatar Oct 13 '21 18:10 snice1981

@snice1981 this code in https://github.com/BSVN/Xamarin.Plugins and you can use NuGet from https://www.nuget.org/packages/BSN.Common.Xam.Plugins.Messaging

soroshsabz avatar Feb 18 '23 18:02 soroshsabz