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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Highlighted
Developer
Posts: 122
Registered: ‎07-26-2008
My Device: 8320, 9500, 9700
My Carrier: Vodafone

Why does ARG_NEW invoke SMS instead of email on certain devices?

Hi there,

 

My application uses the following generic code to invoke the email compose screen:

 

MessageArguments ma = new MessageArguments(MessageArguments.ARG_NEW,bruce@nowhere.com,"A Test Message","Hello World"); Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, ma);

 

 

This code works fine on most devices but on some devices (for example 7250 running OS 4.1 and 8703e running OS 4.2) it opens an SMS message instead.  This is repeatable on both the actual devices and on the simulators.

 

Is there another, more robust, method of invoking the email application?

 

Thanks!

Bruce

 

BlackBerry Development Advisor
Posts: 15,885
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Why does ARG_NEW invoke SMS instead of email on certain devices?

What version of the BlackBerry JDE are you using to build the application?  Are the BlackBerry handhelds you are testing with configured for email service?
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Developer
Posts: 122
Registered: ‎07-26-2008
My Device: 8320, 9500, 9700
My Carrier: Vodafone

Re: Why does ARG_NEW invoke SMS instead of email on certain devices?

So far I can repeat this everytime using the devices mentioned with JDE 4.1.0.185 and 4.2.1.141, the simulators are able to send email via the MDS/Email simulator.  My users who are reporting this on the real devices do have email services.

 

Cheers,

Bruce

BlackBerry Development Advisor
Posts: 15,885
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Why does ARG_NEW invoke SMS instead of email on certain devices?

I haven't been able to reproduce this.  Can you provide a larger sample?
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Developer
Posts: 122
Registered: ‎07-26-2008
My Device: 8320, 9500, 9700
My Carrier: Vodafone

Re: Why does ARG_NEW invoke SMS instead of email on certain devices?

Here is a complete application, I've also included screenshots showing the 8703-JDE simulator and the 8800-JDE for comparison, screens are from JDE 4.2.141.

 

package Emailtest; import net.rim.device.api.ui.*; import net.rim.device.api.ui.container.*; import net.rim.blackberry.api.invoke.*; class EmailTest extends UiApplication { EmailTestScreen scr; public static void main(String[] args) { EmailTest app=new EmailTest(); app.enterEventDispatcher(); } EmailTest() { scr=new EmailTestScreen(); pushScreen(scr); } } class EmailTestScreen extends MainScreen { public EmailTestScreen() { super(); MessageArguments mArgs = new MessageArguments(MessageArguments.ARG_NEW,"bruce@somewhere.com","Test Email","This is a test email"); Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, mArgs); } }

8703e

 

8800

BlackBerry Development Advisor
Posts: 15,885
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Why does ARG_NEW invoke SMS instead of email on certain devices?

Thanks, I was able to reproduce this.  I have also verified that it works correctly in the BlackBerry 8703e simulator included in the version 4.5.0 BlackBerry JDE so it appears that this issue was corrected.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.