01-19-2009 06:52 AM
Solved! Go to Solution.
01-19-2009 07:17 AM
01-19-2009 09:44 PM
To answer your question
"Is there a way to be notified when the messages application is opened? Also, is there a way to have my application invoked when a user "replies" to a message matching a certain criteria?"
The messages application is always running, and there really isn't any way to determine if the messages list was opened.
However, you can get notified when a particular email is opened. Follow these steps:
Attach a FolderListener to the Email inbox to be notified when new email arrives.
When you see an email that matches your criteria, attach a MessageListener to the Message object.
Now, you will get a notification when this email is opened.
01-20-2009 08:46 AM
Appreciate the help. I wrote a blackberry twitter app (http://bbtweet.googlecode.com) that delivers new twitter messages as new emails. This seems to be pushing the limits on what the intended use of the api. I would use the application folders available in 4.6 but I don't want to leave the majority of blackberry users behind.
My goal was to deliver tweets as new messagse into the single message view and allow the user to customize notifications in the profiles on the device. I've accomplished this but I use an immediate notification when new tweets arrive and I need something to trigger a stop immediate notification. Ideally I would do this when the Messages view is opened to mimick the behavior with email/sms/etc.
After reviewing the above, I think I'm going to compromise by sending a stop immediate notification when the app is opened (user is using the device to send a status update) and also when any delivered message is opened (user is obviously reading messages). This gets me as close to the out of box email behavior as I think I'll be able to get.