public static HeadsUpNotificationFragment NewInstance()
        {
            var fragment = new HeadsUpNotificationFragment();

            fragment.RetainInstance = true;
            return(fragment);
        }
示例#2
0
        protected override void OnMessage(Context context, Intent intent)
        {
            const int priority = 10;

            // Finally publish the notification
            var notificationManager = (NotificationManager)GetSystemService(NotificationService);
            var notificationIntent  = NotificationIntent.GetNewMessageIntent(context, intent);
            var notification        = HeadsUpNotificationFragment.NewInstance().CreateNotification(context, notificationIntent);

            // Create and send notification
            notificationManager.Notify(priority, notification);
        }
 public static HeadsUpNotificationFragment NewInstance()
 {
     var fragment = new HeadsUpNotificationFragment ();
     fragment.RetainInstance = true;
     return fragment;
 }