Here are the examples of the csharp api class Android.Support.V4.App.NotificationCompat.Builder.SetSmallIcon(int, int) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
15 Examples
0
1. Example
View licensevoid SendNotification() { var builder = new NotificationCompat.Builder(this) .SetContentTitle("AltBeacon Reference Application") .SetContentText("A beacon is nearby.") .SetSmallIcon(Android.Resource.Drawable.IcDialogInfo); var stackBuilder = Android.App.TaskStackBuilder.Create(this); stackBuilder.AddNextIntent(new Intent(this, typeof(MainActivity))); var resultPendingIntent = stackBuilder.GetPendingIntent( 0, PendingIntentFlags.UpdateCurrent ); builder.SetContentIntent(resultPendingIntent); var notificationManager = (NotificationManager) this.GetSystemService(Context.NotificationService); notificationManager.Notify(1, builder.Build()); }
0
2. Example
View licenseprivate void SendNotification() { var builder = new NotificationCompat.Builder(this) .SetContentTitle("AltBeacon Reference Application") .SetContentText("A beacon is nearby.") .SetSmallIcon(Android.Resource.Drawable.IcDialogInfo); var stackBuilder = Android.App.TaskStackBuilder.Create(this); stackBuilder.AddNextIntent(new Intent(this, typeof(MainActivity))); var resultPendingIntent = stackBuilder.GetPendingIntent( 0, PendingIntentFlags.UpdateCurrent ); builder.SetContentIntent(resultPendingIntent); var notificationManager = (NotificationManager)this.GetSystemService(Context.NotificationService); notificationManager.Notify(1, builder.Build()); }
0
3. Example
View licensevoid SendNotification() { NotificationCompat.Builder builder = new NotificationCompat.Builder(this) .SetContentTitle("Beacon Reference Application") .SetContentText("An beacon is nearby.") .SetSmallIcon(Resource.Mipmap.Icon); var stackBuilder = TaskStackBuilder.Create(this); stackBuilder.AddNextIntent(new Intent(this, typeof(MonitoringActivity))); PendingIntent resultPendingIntent = stackBuilder.GetPendingIntent( 0, PendingIntentFlags.UpdateCurrent ); builder.SetContentIntent(resultPendingIntent); NotificationManager notificationManager = (NotificationManager)this.GetSystemService(Context.NotificationService); notificationManager.Notify(1, builder.Build()); }
0
4. Example
View licenseprivate void StartForeground() { if (ReturnTo == null) { return; } var pendingIntent = PendingIntent.GetActivity(this, 0, new Intent(this, ReturnTo), 0); NotificationCompat.Builder builder = new NotificationCompat.Builder(this); builder.SetTicker("Señal Global"); builder.SetContentTitle("Señal Global"); builder.SetContentText("Estas escuchando Señal Global"); builder.SetContentIntent(pendingIntent); builder.SetOngoing(true); builder.SetCategory(Notification.CategoryService); builder.SetSmallIcon(Resource.Drawable.icon); StartForeground(NotificationId, builder.Build()); }
0
5. Example
View licenseprivate void RegisterForegroundService() { var notification = new NotificationCompat.Builder(this) .SetContentTitle(Resources.GetString(Resource.String.app_name)) .SetContentText(Resources.GetString(Resource.String.service_notification)) .SetSmallIcon(Resource.Drawable.ic_stat_obd) .SetContentIntent(BuildIntentToShowMainActivity()) .SetOngoing(true) .AddAction(BuildStopServiceAction()) .Build(); // Enlist this instance of the service as a foreground service StartForeground(ServiceRunningNotificationId, notification); }
0
6. Example
View licenseprotected override void OnHandleIntent(Intent intent) { if (!CrossConnectivity.C/n ..... /n //View Source file for more details /n }
0
7. Example
View licensevoid CreateNotification(string title, string message, int notifyId, string tag, Bundle extras) /n ..... /n //View Source file for more details /n }
0
8. Example
View licenseprivate void ShowNotification(Intent intent) { const string key = "msg"; if (!intent.Extras/n ..... /n //View Source file for more details /n }
0
9. Example
View licensepublic void StartNotification(IMediaFile mediaFile, bool mediaIsPlaying, bool canBeRemoved) { var icon = (_applicationContext.Resources?.GetIdentifier("xam_mediamanager_notify_ic", "drawable", _applicationContext?.PackageName)).GetValueOrDefault(0); _notificationStyle.SetMediaSession(SessionToken); _notificationStyle.SetCancelButtonIntent(_pendingCancelIntent); _builder = new NotificationCompat.Builder(_applicationContext) { MStyle = _notificationStyle }; _builder.SetSmallIcon(icon != 0 ? icon : _applicationContext.ApplicationInfo.Icon); _builder.SetContentIntent(_pendingIntent); _builder.SetOngoing(mediaIsPlaying); _builder.SetVisibility(1); SetMetadata(mediaFile); AddActionButtons(mediaIsPlaying); if (_builder.MActions.Count >= 3) ((NotificationCompat.MediaStyle)(_builder.MStyle)).SetShowActionsInCompactView(0, 1, 2); if (_builder.MActions.Count == 2) ((NotificationCompat.MediaStyle)(_builder.MStyle)).SetShowActionsInCompactView(0, 1); if (_builder.MActions.Count == 1) ((NotificationCompat.MediaStyle)(_builder.MStyle)).SetShowActionsInCompactView(0); NotificationManagerCompat.From(_applicationContext) .Notify(_notificationId, _builder.Build()); }
0
10. Example
View licensepublic override async void OnReceive(Context context, Intent intent) { try /n ..... /n //View Source file for more details /n }
0
11. Example
View licensevoid SendNotification(string message) { try { Consol/n ..... /n //View Source file for more details /n }
0
12. Example
View licenseprivate async void ScheduleToast(Context context, MalNotification notification) { /n ..... /n //View Source file for more details /n }
0
13. Example
View licenseNotification CreateNotification() { if (metadata == null || playbackState == null) return n/n ..... /n //View Source file for more details /n }
0
14. Example
View licensepublic void OnReceived(IDictionary<string, object> parameters) { System.Di/n ..... /n //View Source file for more details /n }
0
15. Example
View licensepublic void OnReceived(IDictionary<string, object> parameters) { System.Di/n ..... /n //View Source file for more details /n }