Esempio n. 1
0
        private void IncrementNotificationCount()
        {
            //PreferenceHandler prefs = new PreferenceHandler();
            int count = PreferenceHandler.getUnreadNotificationCount();

            PreferenceHandler.setUnreadNotificationCount(count + 1);

            Intent message = new Intent(Utils.Utils.ALERT_BROADCAST);

            //Android.Support.V4.Content.LocalBroadcastManager.GetInstance(this).SendBroadcast(message);

            SendBroadcast(message);
        }
Esempio n. 2
0
        public void setNotificationCount()
        {
            if (notifCount == null)
            {
                return;
            }
            // PreferenceHandler prefs = new PreferenceHandler();
            int notificationCount = PreferenceHandler.getUnreadNotificationCount();

            if (notificationCount <= 0)
            {
                notifCount.Visibility = ViewStates.Gone;
            }
            else
            {
                notifCount.Visibility = ViewStates.Visible;
                notifCount.Text       = notificationCount.ToString();
            }
        }