From webserivce I am getting data in the form of dates and time, means for some particular date i am having some set of slots. The following diagram gives the detailed explanation.
Here on each date I have some set to timings. Here what i want is to display notification at the particular date and time. If the response from database consists of tomorrow date like 07/12/2012 at 11:00 AM. I need to display notification at that time.
I have some idea regarding notification manager and code i am using is..
Main.java
NotificationManager notificationManager = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
Notification notification = new Notification(R.drawable.ic_action_search, "A New Message!", System.currentTimeMillis());
Intent notificationIntent = new Intent(this, Main.class);
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0);
notification.setLatestEventInfo(Main.this, notificationTitle, notificationMessage, pendingIntent);
notificationManager.notify(10001, notification);
But here i need to get notifications when app is closed also. So, anyone help me with this.