using Android.Support.V4.App;
namespace Droid_Notificacoes
[Activity(Label = "Droid_Notificacoes", MainLauncher = true, Icon = "@drawable/icon")]
public class MainActivity : Activity
protected override void OnCreate(Bundle bundle)
SetContentView (Resource.Layout.Main);
Button btnNotifica = FindViewById<Button>(Resource.Id.btnNotifica);
btnNotifica.Click += delegate
Intent novaIntent = new Intent(this, typeof(MainActivity));
PendingIntent resultPendingIntent = PendingIntent.GetActivity(this, 0, novaIntent, PendingIntentFlags.CancelCurrent);
string conteudo = "Macoratti .net - Quase tudo para a plataforma .NET, incluindo Visual Basic, C#, ASP .NET MVC , Xamarin Forms e Xamarin Android, ASP .NET Core";
NotificationCompat.Builder builder = new NotificationCompat.Builder(this)
.SetContentIntent(resultPendingIntent)
.SetContentTitle("Notificacão do Macoratti")
.SetSmallIcon(Resource.Drawable.Icon)
.SetStyle(new NotificationCompat.BigTextStyle().BigText(conteudo))
.SetContentText(conteudo);
NotificationManager gerenciaNotificacao = (NotificationManager)GetSystemService(Context.NotificationService);
gerenciaNotificacao.Notify(iNotificacao, builder.Build());