简体   繁体   中英

Getting the result of sending an SMS/Email in Xamarin Forms

I have a Xamarin Forms project and would like to send SMS and emails and take action depending on whether they were sent, canceled, or failed. I'm currently using Xam.Plugins.Messaging but I don't see how I'm supposed to get the end status result of this action. With Objective CI would use messageComposeViewController:didFinishWithResult to find out if the message was sent or cancelled or failed and with Android's Java I believe there was a BroadcastReceiver that would do the same thing. Does this plugin have that ability and I'm just overlooking it?

If not, then could I implement this myself? I found this other tutorial which shows how to implement cross platform sending of SMS and emails but it also appears to lack a way to get the end result: http://blog.xamarians.com/Blog/2017/6/28/sending-message-e-mails-and-making-calls

使用Xamarin,您可以使用C#完全访问iOS和Android的API :,因此可以使用与使用iOS的Objective-C或Android的Java时应使用的相同的API:实现自己。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM