Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sample to open WhatsApp to send message to specific number from your Xamarin.Forms application using this package - http://julianocustodio.com/OpenWhatsApp
using System;
using Xamarin.Forms;
using Xamarin.Forms.OpenWhatsApp;
namespace OpenWhatsAppSample
{
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
}
private async void Send(object sender, EventArgs e)
{
try
{
Chat.Open("+5515999999999","Send this message");
}
catch (Exception ex)
{
await DisplayAlert("Erro", ex.Message, "OK");
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment