:::: MENU ::::

Accessing Call, SMS & Email service in Xamarin.Forms

Adding phone call, SMS and Email feature is easy in Xamarin.Forms. Thanks to Carel Lotz for creating plugin. His plugin provide three services Call, SMS and Email. In this post let’s see how to implement all three services in Xamarin.Forms (PCL) project.

First let’s create simple UI to enter phone number, message and email. Here is my very simple UI.

Don’t worry about code I uploaded it on github.

First two entry and button is for sending SMS, second two for phone call and remaining are for Email purpose.

Lets add Nuget package. Add this nuget package on your all projects (pcl, android, iOS, winphone).

Now let’s implement the services.

For Sending SMS:

In SendSms click event of add the following code.

For making Call:

In CallNo click event add following code.

For Sending Email:

In SendEmail click event add the following code.

Here I am applying simple email structure but you can also include complex email structure see sample code here.

Tips: Don’t forgot to enable CALL_PHONE and SEND_SMS capabilities in android project and ID_CAP_PHONEDAILER capabilities on windows phone.

Now only this much for code. Let’s build and see result;

Here we go on my windows phone.

call email sms

Yeah!!! It works fine. Complete code is here.

Happy Coding!!! 🙂

  • Hi to all, how is all, I think every one is getting
    more from this website, and your views are nice in support of new

  • Phil

    Tried your send email example in iOS simulator and email was never received. No exceptions thrown.

    • Phil

      My mistake, I hadn’t created an email account in the default email application on my Mac book. However, what I was hoping to do was send an email entirely in the background, without any user interaction. Is there a way to do this with your library? Thanks

      • hardcode19

        As per my knowledge this library doesn’t support that functionality.

      • mansi

        I think you can try mailgun or mandrill

  • dada

    Ia there a Xamarin.Forms API for incoming SMS like using SMSReceiver based on Android.Content.BroadcastReceiver, one that would work on UWP at least, if not on iOS/WP8?

  • edi

    Thank you for sharing, can you tell me how do you make this ui style