private void ReleaseResidentVehicleNotification(string jsonNotificationMessage) { try { NotificationCompat.Builder mBuilder = new Android.Support.V4.App.NotificationCompat.Builder(this) .SetPriority(NotificationCompat.PriorityHigh) .SetVibrate(new long[] { 1000, 2000, 3000 }) .SetSound(RingtoneManager.GetDefaultUri(RingtoneType.Notification)) .SetSmallIcon(Resource.Mipmap.im_logo_d) .SetContentTitle("Запит по фізичній особі") .SetContentText("Оброблено") .SetContentIntent(PendingIntent.GetActivity(this, 0, MainActivity.GetIntentWithParsedResidentVehicleDetail(this, jsonNotificationMessage), PendingIntentFlags.UpdateCurrent)) .SetAutoCancel(true); if (Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop) { mBuilder.SetVibrate(new long[] { 0 }); } NotificationManager mNotificationManager = (NotificationManager)GetSystemService(Android.Content.Context.NotificationService); mNotificationManager.Notify(0, mBuilder.Build()); } catch (Exception exc) { Console.WriteLine("Cant build bar notification. {0}", exc.Message); Debugger.Break(); } }
/// <summary> /// Download progress /// </summary> /// <param name="sender"></param> /// <param name="e"></param> /// <param name="builder_"></param> private void DownloadFileProgressChanged(object sender, DownloadProgressChangedEventArgs e, Android.Support.V4.App.NotificationCompat.Builder builder_) { // Progress string s = e.UserState as String; string[] s_ = s.Split(new char[] { '|' }); try { if (e.ProgressPercentage < 100) { // Notification builder_.SetContentTitle("Downloading - " + e.ProgressPercentage + " %"); builder_.SetProgress(100, e.ProgressPercentage, false); } else { builder_.SetContentTitle("Download completed"); builder_.SetProgress(100, e.ProgressPercentage, false); } NotificationManager notificationManager = (NotificationManager)ActivityContext.mActivity.GetSystemService(Context.NotificationService); notificationManager.Notify(Convert.ToInt32(s_[2]), builder_.Build()); } catch { } #if DEBUG Console.WriteLine(e.ProgressPercentage + " %"); #endif Log.println(e.ProgressPercentage + " %"); }
void SendNotification(string messageBody) { try { var response = JsonConvert.DeserializeObject <PushNotificationRequest>(messageBody); var intent = new Intent(this, typeof(EventDetailActivity)); intent.PutExtra("eventId", response.EventId); // intent.AddFlags(ActivityFlags.ClearTop); var pendingIntent = PendingIntent.GetActivity(this, 0 /* Request code */, intent, PendingIntentFlags.OneShot); var defaultSoundUri = RingtoneManager.GetDefaultUri(RingtoneType.Notification); var notificationBuilder = new Android.Support.V4.App.NotificationCompat.Builder(this) .SetContentTitle(response.EventTitle) .SetContentText(response.Question) .SetAutoCancel(true) .SetSound(defaultSoundUri) .SetContentIntent(pendingIntent); var notificationManager = NotificationManager.FromContext(this); notificationManager.Notify(0, notificationBuilder.Build()); } catch (Exception ex) { } }
public new void NotifyExpired() { var builder = new Android.Support.V4.App.NotificationCompat.Builder(this, CHANNEL_ID) .SetAutoCancel(true) // Dismiss the notification from the notification area when the user clicks on it .SetContentTitle("Expired Items") // Set the title .SetSmallIcon(Resource.Drawable.Icon) // This is the icon to display .SetContentText("You have expired Items in your inventory"); // the message to display. // Finally, publish the notification: var notificationManager = Android.Support.V4.App.NotificationManagerCompat.From(this); notificationManager.Notify(NOTIFICATION_ID, builder.Build()); }
void CreateNotification() { var intent = new Intent(this, typeof(MainActivity)); // Build the notification: var builder = new Android.Support.V4.App.NotificationCompat.Builder(this, CHANNEL_ID) .SetContentTitle("Wifi is off!!") // Set the title .SetSmallIcon(Resource.Drawable.notification_icon_background) // This is the icon to display .SetOngoing(true) .SetContentIntent(PendingIntent.GetActivity(this, NOTIFICATION_ID, intent, PendingIntentFlags.CancelCurrent)); // Finally, publish the notification: var notificationManager = NotificationManagerCompat.From(this); notificationManager.Notify(NOTIFICATION_ID, builder.Build()); }
private void TODO_RELEASE_TEMPORARY_NOTIFICATION_FOR_DEV(string contentText) { try { NotificationCompat.Builder mBuilder = new Android.Support.V4.App.NotificationCompat.Builder(this) .SetPriority(NotificationCompat.PriorityHigh) .SetVibrate(new long[] { 1000 }) .SetSmallIcon(Resource.Mipmap.im_logo_d) .SetContentTitle(contentText) .SetContentIntent(PendingIntent.GetActivity(this, 0, MainActivity.GetIntentWithParsedResidentVehicleDetail(this, "{ }"), PendingIntentFlags.UpdateCurrent)) .SetAutoCancel(true); NotificationManager mNotificationManager = (NotificationManager)GetSystemService(Android.Content.Context.NotificationService); mNotificationManager.Notify(0, mBuilder.Build()); } catch (Exception exc) { Console.WriteLine("TODO_RELEASE_TEMPORARY_NOTIFICATION_FOR_DEV cant build bar notification. {0}", exc.Message); Debugger.Break(); } }
void SendNotification(string messageBody, string subtitle, string message) { //Display notification however necessary var intent = new Intent(this, typeof(MainActivity)); intent.AddFlags(ActivityFlags.ClearTop); var pendingIntent = PendingIntent.GetActivity(this, 0, intent, PendingIntentFlags.OneShot); var notificationBuilder = new Android.Support.V4.App.NotificationCompat.Builder(this) .SetSmallIcon(Resource.Drawable.Icon) .SetStyle(new NotificationCompat.BigTextStyle().BigText(message)) .SetContentTitle("title") .SetContentText(subtitle) .SetContentIntent(pendingIntent); var notificationManager = NotificationManager.FromContext(this); notificationManager.Notify(0, notificationBuilder.Build()); }
void SendNotification(Message message) { Intent intent = new Intent(this, typeof(MainActivity)); intent.AddFlags(ActivityFlags.ClearTop); PendingIntent pendingIntent = PendingIntent.GetActivity(this, 0 /* Request code */, intent, PendingIntentFlags.OneShot); var defaultSoundUri = RingtoneManager.GetDefaultUri(RingtoneType.Notification); var notificationBuilder = new Android.Support.V4.App.NotificationCompat.Builder(this) .SetSmallIcon(Resource.Drawable.Icon) .SetContentTitle(message.AlertType) .SetContentText(message.CreatedDate.ToString()) .SetAutoCancel(true) .SetSound(defaultSoundUri) .SetContentIntent(pendingIntent); var notificationManager = NotificationManager.FromContext(this); notificationManager.Notify(0 /* ID of notification */, notificationBuilder.Build()); }
/// <summary> /// When we start on the foreground we will present a notification to the user /// When they press the notification it will take them to the main page so they can control the music /// </summary> public void StartForeground() { try { var pendingIntent = PendingIntent.GetActivity(ApplicationContext, 0, new Intent(ApplicationContext, typeof(MainActivity)), PendingIntentFlags.UpdateCurrent); var builder = new Android.Support.V4.App.NotificationCompat.Builder(Android.App.Application.Context, MainActivity.CHANNEL_ID) .SetAutoCancel(true) // Dismiss the notification from the notification area when the user clicks on it .SetContentTitle("BitChute video download started") .SetSmallIcon(Resource.Drawable.bitchute_notification2) .SetPriority(NotificationCompat.PriorityLow); StartForeground(-7777, builder.Build()); } catch { } }
/// <summary> /// Notification builder /// </summary> /// <param name="title"></param> /// <param name="text"></param> /// <param name="notificationID"></param> /// <returns></returns> private Android.Support.V4.App.NotificationCompat.Builder publishnotification_(string title, string text, int notificationID) { // Generate notification Intent notificationIntent = new Intent(ActivityContext.mActivity, typeof(MainActivity)); Android.Support.V4.App.TaskStackBuilder stackBuilder = Android.Support.V4.App.TaskStackBuilder.Create(ActivityContext.mActivity); stackBuilder.AddParentStack(Java.Lang.Class.FromType(typeof(MainActivity))); stackBuilder.AddNextIntent(notificationIntent); PendingIntent contentIntent = stackBuilder.GetPendingIntent(0, (int)PendingIntentFlags.UpdateCurrent); // Instantiate the builder and set notification elements, including // the pending intent: Android.Support.V4.App.NotificationCompat.Builder builder = new Android.Support.V4.App.NotificationCompat.Builder(ActivityContext.mActivity, CHANNEL_ID) .SetContentTitle(title) .SetContentText(text) .SetSmallIcon(Resource.Drawable.Icon) .SetAutoCancel(true) .SetContentIntent(contentIntent); // Build the notification: Notification notification = builder.Build(); // Get the notification manager: NotificationManager notificationManager = ActivityContext.mActivity.GetSystemService(Context.NotificationService) as NotificationManager; // Publish the notification: notificationManager.Notify(notificationID, notification); #if DEBUG Console.WriteLine("Notification published: " + notificationID); #endif Log.println("Notification published: " + notificationID); return(builder); }
//https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/navigation/hierarchical //https://documentation.onesignal.com/docs/customize-notification-icons void SendNotification(string messageBody, string _titulo) { var intent = new Intent(this, typeof(MainActivity)); intent.AddFlags(ActivityFlags.ClearTop); //intent.PutExtra var pendingIntent = PendingIntent.GetActivity(this, 0, intent, PendingIntentFlags.OneShot); //Bitmap largeIcon = BitmapFactory.DecodeResource(Resources, Resource.Drawable.ICONOAPP); var notificationManager = NotificationManager.FromContext(this); var notificationBuilder = new Android.Support.V4.App.NotificationCompat.Builder(this) .SetSmallIcon(Resource.Drawable.Logo_Redondo_512x512_Blanco)//color// .SetLargeIcon(largeIcon) .SetContentTitle(_titulo) .SetContentText(messageBody) .SetContentIntent(pendingIntent) .SetColor(40150209) .SetStyle(new NotificationCompat.BigTextStyle().BigText(messageBody)) .SetSound(RingtoneManager.GetDefaultUri(RingtoneType.Notification)) .SetPriority(1) .SetAutoCancel(true); if (Build.VERSION.SdkInt >= BuildVersionCodes.O) { // The id of the channel. ----The user-visible name of the channel. NotificationChannel mChannel = new NotificationChannel("channelTratoEspecial", "Canal Visible", NotificationImportance.High); // Configure the notification channel. mChannel.Description = "Description channel"; mChannel.EnableLights(true); // Sets the notification light color for notifications posted to this // channel, if the device supports this feature. mChannel.LightColor = Color.Red; mChannel.SetShowBadge(true); notificationBuilder.SetChannelId("channelTratoEspecial"); notificationManager.CreateNotificationChannel(mChannel); } notificationManager.Notify(0, notificationBuilder.Build()); }
private List <Paths> SearchForSongs() { string[] filters; char[] specialChars; using (IXmlParsable parser = new XmlFilterParser(InternalStorageHelper.InternalXmlFileLocation + "/FiltersAndSpecialChars")) { XmlFilterParser.RVal data = (XmlFilterParser.RVal)parser.FetchItems(); filters = data.filters; specialChars = data.specialChars; } List <Track> tracksFromSD = new List <Track>(); bool hasSd = false; try { tracksFromSD = TrackFinder.GetListOfTracksFromSD(Context, filters, specialChars); hasSd = true; } catch (NotMountedException e) { ISharedPreferences prefs = Context.GetSharedPreferences(Notification_Settings.Root, FileCreationMode.Private); if (prefs.GetBoolean(Notification_Settings.ErrorNotKey, true)) { using (var style = new Android.Support.V7.App.NotificationCompat.BigTextStyle()) { using (Android.Support.V7.App.NotificationCompat.Builder builder = new Android.Support.V7.App.NotificationCompat.Builder(Context)) { using (Android.Support.V4.App.NotificationCompat.Builder not = builder .SetSmallIcon(Resource.Drawable.Logo).SetContentTitle("No SD card found!").SetContentText(e.Message) .SetPriority((int)NotificationPriority.Min).SetStyle(style.BigText(e.Message)) .SetVibrate(new long[] { 1000, 1000, 1000, 1000 })) { var notificationManager = (NotificationManager)Context.GetSystemService(Context.NotificationService); notificationManager.Notify(0, not.Build()); } } } } } List <Track> tracks = new List <Track>(); try { tracks = TrackFinder.GetListOfTracksFromPhone(Context); } catch (Exception ex) { ((Activity)Context).RunOnUiThread(() => { Toast.MakeText(Context, ex.Message, ToastLength.Long).Show(); }); } if (hasSd) { tracks = tracks.Union(tracksFromSD).ToList(); } List <Paths> paths = new List <Paths>(); foreach (var track in tracks) { paths.Add(new Paths() { Path = track.Path, Title = track.FullTitle }); } return(paths); }
//public static void ShowOkAlert(Context context,string Message) //{ // AlertDialog.Builder alert = new AlertDialog.Builder(context); // alert.SetMessage(Message); // alert.SetPositiveButton("Ok", (senderAlert, args) => { // }); // Dialog dialog = alert.Create(); // dialog.Show(); //} //Download from url------------------------------------------ public static async void DownLoadSource(string url, Java.IO.File _appDirectory, Java.IO.File newFile, string filePath, Context context, string FileName, int notificationId) { // ShowToast(context, context.Resources.GetString(Resource.String.downloading) + Newsrc); var NotificationId = notificationId; string localPath; try { System.Uri uri = new System.Uri(url); WebClient webClient = new WebClient(); string localFileName; webClient.DownloadDataAsync(uri); Log.Debug("tag", "File to download = " + newFile.ToString()); MimeTypeMap mime = MimeTypeMap.Singleton; String ext = newFile.Name.Substring(newFile.Name.IndexOf(".") + 1); String type = mime.GetMimeTypeFromExtension(ext); Intent openFile = new Intent(Intent.ActionView, Android.Net.Uri.FromFile(newFile)); openFile.SetDataAndType(Android.Net.Uri.FromFile(newFile), type); openFile.AddFlags(ActivityFlags.ClearTop | ActivityFlags.SingleTop | ActivityFlags.NewTask); PendingIntent p = PendingIntent.GetActivity(context, 0, openFile, 0); var notification = new Android.Support.V4.App.NotificationCompat.Builder(context) .SetSmallIcon(Android.Resource.Drawable.StatNotifySync) .SetContentTitle(FileName) .SetContentText(" Downloading") .SetOngoing(false); notification.SetProgress(0, 0, true); NotificationManager notificationmanager = (NotificationManager)Android.App.Application.Context.GetSystemService(Service.NotificationService); // Build Notification with Notification Manager notificationmanager.Notify((int)NotificationId, notification.Build()); webClient.DownloadDataCompleted += (s, e) => { try { if (!_appDirectory.Exists()) { _appDirectory.Mkdirs(); } var bytes = e.Result; // get the downloaded data { notification.SetContentText(" Downloaded"); notification.SetContentTitle(FileName); notification.SetContentIntent(p); notification.SetProgress(0, 0, false); notification.SetAutoCancel(true);// Notification.Flags = NotificationFlags.AutoCancel; //System.IO.File.WriteAllBytes(filePath, bytes); notificationmanager.Notify((int)NotificationId, notification.Build()); // writes to local storage } } catch (Exception ex) { } }; } catch (System.Exception ex) { } }
protected override void OnCreate(Bundle bundle) { base.OnCreate (bundle); SetContentView (Resource.Layout.MainScreen); TextView txtCommuteBuddy = FindViewById<TextView> (Resource.Id.selectService); Button btnMTA = FindViewById<Button> (Resource.Id.btnMTA); Button btnHighway = FindViewById<Button> (Resource.Id.btnHighway); btnMTA.Click += delegate { StartActivity(typeof(MTAfeed)); }; btnHighway.Click += delegate { StartActivity(typeof(highwayFeed)); }; XmlSerializer MtaSerializer = new XmlSerializer (typeof(Service), new XmlRootAttribute ("service")); XmlTextReader mtaReader = new XmlTextReader ("http://www.mta.info/status/serviceStatus.txt"); Service mtaObject = (Service)MtaSerializer.Deserialize (mtaReader); String statusString = (String)mtaObject.mta [7].name + " - " + mtaObject.mta[7].status; SpannedString statusSpanned = new SpannedString (Html.FromHtml (statusString)); int notificationId = 1000; Intent resultIntent = new Intent(this, typeof(MTAfeed)); Android.Support.V4.App.TaskStackBuilder stackBuilder = Android.Support.V4.App.TaskStackBuilder.Create(this); stackBuilder.AddParentStack(Java.Lang.Class.FromType(typeof(MTAfeed))); stackBuilder.AddNextIntent(resultIntent); PendingIntent resultPendingIntent = stackBuilder.GetPendingIntent(0, (int)PendingIntentFlags.UpdateCurrent); Android.Support.V4.App.NotificationCompat.Builder note = new Android.Support.V4.App.NotificationCompat.Builder (this) .SetContentTitle("Service Change") .SetAutoCancel(true) .SetContentIntent(resultPendingIntent) .SetSmallIcon(Resource.Drawable.icon) .SetContentText(statusSpanned); NotificationManager notificationManager = (NotificationManager)GetSystemService (Context.NotificationService); notificationManager.Notify (notificationId, note.Build()); }
public static async void SendNotifications(List <CustomNotification> notificationList) { await Task.Run(() => { try { if (_notificationManager == null) { _notificationManager = Android.Support.V4.App.NotificationManagerCompat.From(Android.App.Application.Context); } if (notificationList.Count == 0) { return; } int notePos = 0; foreach (var note in notificationList) { var resultIntent = new Intent(Android.App.Application.Context, typeof(MainActivity)); var valuesForActivity = new Bundle(); valuesForActivity.PutInt(MainActivity.COUNT_KEY, _count); valuesForActivity.PutString("URL", note.NoteLink); resultIntent.SetAction(MainPlaybackSticky.ActionLoadUrl); resultIntent.PutExtras(valuesForActivity); var resultPendingIntent = PendingIntent.GetActivity(Android.App.Application.Context, MainActivity.NOTIFICATION_ID, resultIntent, PendingIntentFlags.UpdateCurrent); resultIntent.AddFlags(ActivityFlags.SingleTop); var alarmAttributes = new Android.Media.AudioAttributes.Builder() .SetContentType(Android.Media.AudioContentType.Sonification) .SetUsage(Android.Media.AudioUsageKind.Notification).Build(); if (!_sentNotificationList.Contains(note) && notePos == 0) { var builder = new Android.Support.V4.App.NotificationCompat.Builder(Android.App.Application.Context, MainActivity.CHANNEL_ID + 1) .SetAutoCancel(true) // Dismiss the notification from the notification area when the user clicks on it .SetContentIntent(resultPendingIntent) // Start up this activity when the user clicks the intent. .SetContentTitle(note.NoteText) .SetNumber(1) .SetSmallIcon(Resource.Drawable.bitchute_notification2) .SetContentText(note.NoteType) .SetPriority(Android.Support.V4.App.NotificationCompat.PriorityMin); MainActivity.NOTIFICATION_ID++; // publish the notification: //var notificationManager = Android.Support.V4.App.NotificationManagerCompat.From(_ctx); _notificationManager.Notify(MainActivity.NOTIFICATION_ID, builder.Build()); _sentNotificationList.Add(note); notePos++; } else if (!_sentNotificationList.Contains(note)) { var builder = new Android.Support.V4.App.NotificationCompat.Builder(Android.App.Application.Context, MainActivity.CHANNEL_ID) .SetAutoCancel(true) // Dismiss the notification from the notification area when the user clicks on it .SetContentIntent(resultPendingIntent) // Start up this activity when the user clicks the intent. .SetContentTitle(note.NoteText) // Set the title .SetNumber(1) // Display the count in the Content Info //.SetLargeIcon(_notificationBMP) // This is the icon to display .SetSmallIcon(Resource.Drawable.bitchute_notification2) .SetContentText(note.NoteType) .SetPriority(Android.Support.V4.App.NotificationCompat.PriorityLow); MainActivity.NOTIFICATION_ID++; // publish the notification: //var notificationManager = Android.Support.V4.App.NotificationManagerCompat.From(_ctx); _notificationManager.Notify(MainActivity.NOTIFICATION_ID, builder.Build()); _sentNotificationList.Add(note); notePos++; } MainPlaybackSticky.NotificationsHaveBeenSent = true; } } catch { } }); }
public static Notification BuildPlayControlNotification() { var pendingIntent = PendingIntent.GetActivity(Android.App.Application.Context, 0, new Intent(Android.App.Application.Context, typeof(MainActivity)), PendingIntentFlags.UpdateCurrent); // Using RemoteViews to bind custom layouts into Notification RemoteViews views = new RemoteViews(Android.App.Application.Context.PackageName, Resource.Layout.PlaystateNotification); RemoteViews bigViews = new RemoteViews(Android.App.Application.Context.PackageName, Resource.Layout.PlaystateNotification); Intent notificationIntent = new Intent(Android.App.Application.Context, typeof(MainActivity)); Intent previousIntent = new Intent(Android.App.Application.Context, typeof(MainPlaybackSticky)); previousIntent.SetAction(MainPlaybackSticky.ActionPrevious); PendingIntent ppreviousIntent = PendingIntent.GetService(Android.App.Application.Context, 0, previousIntent, 0); Intent playIntent = new Intent(Android.App.Application.Context, typeof(MainPlaybackSticky)); playIntent.SetAction(MainPlaybackSticky.ActionPlay); PendingIntent pplayIntent = PendingIntent.GetService(Android.App.Application.Context, 0, playIntent, 0); Intent nextIntent = new Intent(Android.App.Application.Context, typeof(MainPlaybackSticky)); nextIntent.SetAction(MainPlaybackSticky.ActionNext); PendingIntent pnextIntent = PendingIntent.GetService(Android.App.Application.Context, 0, nextIntent, 0); Intent pauseIntent = new Intent(Android.App.Application.Context, typeof(MainPlaybackSticky)); pauseIntent.SetAction(MainPlaybackSticky.ActionPause); PendingIntent ppauseIntent = PendingIntent.GetService(Android.App.Application.Context, 0, pauseIntent, 0); Intent playNoteInBkgrdIntent = new Intent(Android.App.Application.Context, typeof(MainPlaybackSticky)); playNoteInBkgrdIntent.SetAction(MainPlaybackSticky.ActionBkgrdNote); PendingIntent pplayNoteInBkgrdIntent = PendingIntent.GetService(Android.App.Application.Context, 0, playNoteInBkgrdIntent, 0); Intent playNoteResumeIntent = new Intent(Android.App.Application.Context, typeof(MainPlaybackSticky)); playNoteResumeIntent.SetAction(MainPlaybackSticky.ActionResumeNote); PendingIntent pplayNoteResumeIntent = PendingIntent.GetService(Android.App.Application.Context, 0, playNoteResumeIntent, 0); views.SetOnClickPendingIntent(Resource.Id.notificationPlay, pplayIntent); bigViews.SetOnClickPendingIntent(Resource.Id.notificationPlay, pplayIntent); views.SetOnClickPendingIntent(Resource.Id.notificationPause, ppauseIntent); bigViews.SetOnClickPendingIntent(Resource.Id.notificationPause, ppauseIntent); views.SetOnClickPendingIntent(Resource.Id.notificationNext, pnextIntent); bigViews.SetOnClickPendingIntent(Resource.Id.notificationNext, pnextIntent); views.SetOnClickPendingIntent(Resource.Id.notificationPrevious, ppreviousIntent); bigViews.SetOnClickPendingIntent(Resource.Id.notificationPrevious, ppreviousIntent); bigViews.SetOnClickPendingIntent(Resource.Id.notificationPlaysInBkgrdOnRb, pplayNoteInBkgrdIntent); views.SetOnClickPendingIntent(Resource.Id.notificationPlaysInBkgrdOnRb, pplayNoteInBkgrdIntent); bigViews.SetOnClickPendingIntent(Resource.Id.notificationPlaysInBkgrdOffRb, pplayNoteResumeIntent); views.SetOnClickPendingIntent(Resource.Id.notificationPlaysInBkgrdOffRb, pplayNoteResumeIntent); var builder = new Android.Support.V4.App.NotificationCompat.Builder(Android.App.Application.Context, MainActivity.BACKGROUND_CHANNEL_ID) //.SetAutoCancel(true) // Dismiss the notification from the notification area when the user clicks on it .SetContentTitle("BitChute streaming in background") .SetSmallIcon(Resource.Drawable.bitchute_notification2) .SetOngoing(true) .SetPriority(Android.Support.V4.App.NotificationCompat.PriorityMax); var status = builder.Build(); status.ContentView = views; status.BigContentView = bigViews; status.Priority = (int)NotificationPriority.Max; status.Icon = Resource.Drawable.bitchute_notification2; status.ContentIntent = pendingIntent; return(status); }