BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 03-09-2010, 11:45 AM   #1 (permalink)
New Member
 
Join Date: Jan 2010
Model: Curve
PIN: N/A
Carrier: AT&T
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default How can I override the Open Method in the Mail app?

Please Login to Remove!

Hi all -

I want to deliver data to my users via the mail message queue. I can receive a formatted mail message and have inserted a custom menu item via

repository.addMenuItem(MENUITEM_MESSAGE_LIST, MyCustomMenuItem);

but this still requires the user to select MyCustomMenuItem.

I can identify which messages are specific to my app, so I want to override the Open method for Mail messages to conditionally call my handler instead of the default "open mail message" method.

Can someone provide assistance in how to accomplish this?

Thanks in advance.

Dave
Offline  
Old 03-09-2010, 12:46 PM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

You cannot override the open method of the mail application.
Offline  
Old 03-09-2010, 12:59 PM   #3 (permalink)
New Member
 
Join Date: Jan 2010
Model: Curve
PIN: N/A
Carrier: AT&T
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the quick reply Doug.

I want to deliver my information via the mail message queue as that is the normal way to receive a notification about newly updated information on the device, but then I want to parse the data and handle with my own app/user interface.

Is there some other approach I should be taking then or is it the normal case to just add a custom menu option and teach the user to select it?

Dave
Offline  
Old 03-09-2010, 05:17 PM   #4 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

The normal case is to add a custom menu option. In 5.0, you can control which items in the list get your menu item (but no on earlier releases).

I think I also answered your question on the RIM forum. You can set up a listener to catch the "open" message event, and you could conceivably invoke a global-modal screen triggered by this event.

However, be aware that the message listener will be called from, the context of the Messages app, not your own app. This means (for example) that you will not be able to push a screen from this listener thread. You'll need to notify your app of the event (possibly using the global event mechanism) to trigger the screen push.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.