简体   繁体   English

获得以Xamarin形式发送SMS /电子邮件的结果

[英]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. 我有一个Xamarin Forms项目,想发送SMS和电子邮件,并根据发送,取消或失败的情况采取措施。 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. 我目前正在使用Xam.Plugins.Messaging,但是我看不到如何获得此操作的最终状态结果。 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. 使用Objective CI,可以使用messageComposeViewController:didFinishWithResult来确定消息是发送,取消还是失败,而使用Android的Java,我相信有一个BroadcastReceiver可以做到这一点。 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 我找到了另一本教程,该教程显示了如何实现跨平台的SMS和电子邮件发送,但是它似乎也缺乏获得最终结果的方法: http : //blog.xamarians.com/Blog/2017/6/28/sending消息电子邮件和拨打电话

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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