Exemplo n.º 1
0
        //check if goal near deadline
        public void CheckUpdate()
        {
            Thread t = new Thread(() =>
            {
                Thread.Sleep(6000);
                if (ProjectsCollection.CheckItem(DateTime.Now))
                {
                    var nMgr = (NotificationManager)GetSystemService(NotificationService);

                    //Details of notification in previous recipe
                    Notification.Builder builder = new Notification.Builder(this)
                                                   .SetAutoCancel(true)
                                                   .SetContentTitle("Project Deadline")
                                                   .SetNumber(notifyId)
                                                   .SetContentText("Some project deadline are today. Please check to update progress.")
                                                   .SetVibrate(new long[] { 100, 200, 300 })
                                                   .SetSmallIcon(Resource.Drawable.ic_bell);

                    nMgr.Notify(0, builder.Build());
                }
            });

            t.Start();
        }