-
-
Save ShravanJ/f6ba9aff07ff74dbc9f4508b1f6e3c5b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var pending = PendingIntent.GetActivity(context, 0, | |
resultIntent, | |
PendingIntentFlags.CancelCurrent); | |
var builder = new Notification.Builder(context) | |
.SetContentTitle(title) | |
.SetContentText(message) | |
.SetDefaults(NotificationDefaults.All) | |
.SetSound(RingtoneManager.GetDefaultUri(RingtoneType.Alarm)); | |
builder.SetContentIntent(pending); | |
var notification = builder.Build(); | |
var manager = NotificationManager.FromContext(context); | |
manager.Notify(1337, notification); | |
MediaPlayer player; | |
player = MediaPlayer.Create(context, Resource.Raw.CustomToneName); | |
player.Start(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment