Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
youngjun
Posts: 40
Registered: ‎09-03-2008
My Device: Not Specified

Add phone # context menu to email

I need to add a new context menu for phone numbers ( other than call  and SMS) in emails which will use our own application to call the number. I've implemented my own ActiveFieldCookie, Factory and ContextMenu based on the information from http://na.blackberry.com/eng/devjournals/resources/journals/mar_2007/dmenu.jsp.

Do I need to implement my own StringPattern class to find phone#, or there is a way to leverage the existing phone number pattern already used by native Email application? if so, how?

 

Thanks,

 

June

Developer
youngjun
Posts: 40
Registered: ‎09-03-2008
My Device: Not Specified

Re: Add phone # context menu to email

I added my own StringPattern class. My new context menu for phone # in emails worked. However, I noticed that my own StringPattern.findMatch() is only invoked if the email is plain text. HTML email body does not trigger my registered String pattern class, while it is parsed by the native phone# pattern class to bring up Call # and SMS# menu.   Could anyone advise how to achieve this with my own StringPattern class?  

 

 Thanks,

 

June

 

Developer
youngjun
Posts: 40
Registered: ‎09-03-2008
My Device: Not Specified

Re: Add phone # context menu to email

I also noticed that when my own Phone String Pattern detects the same phone# sttring as the native Pattern class, my match.id gets overriden by the native class's match.id, as the result, my context menu does not display while the native call# and SMS# menu display.

 

Does anyone use different approach for the similar task to add a context menu for phone# in email?   

 

June