06-02-2009 11:21 AM
I'm writing and application that has two processes - a backend process that runs all the time that retrieves data from a server, and a frontend GUI that may not be running all the time. The backend may hit errors that it needs to notify the user about. Rather than roll my own inter-process queuing method I saw NotificationListener and deferred events with the NotificationsManager.
1. Is this the right API for my purpose, or would you recommend something else?
2. If I send a deferred event when no listener is running will the events be queued pending a listener being created?
3. If I send the same event again while it is still queued will two events be delivered or does the NotificationsManager spot the duplicate and eliminate it?
I'm trying to test this out but I'm getting some odd results, so if someone can speak from knowledge or experience I'd be very grateful.
06-02-2009 11:44 AM
06-02-2009 12:51 PM
Thanks for this. Just one thought - I'm not using immediate events (used for vibration, sound), I'm using deferred events (intended for UI components that interact with the user). Does your answer apply there?
In any case all your solutions look good, so I'll probably try one of these.