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
Posts: 813
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later
Accepted Solution

Open SMS and email

Hello, in my code I have a menu sens sms.If he clicks it, I want to open the send sms page... so that he sends message to anyone he wants.

 

I also want send email menu, how can I open his default email ? how can i open email page and send him?

 

 

thansk for help

Developer
Posts: 16,992
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Open SMS and email

use http://www.blackberry.com/developers/docs/7.1.0api/net/rim/blackberry/api/invoke/Invoke.html#invokeA... net.rim.blackberry.api.invoke.ApplicationArguments) with the matching argument.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 813
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

Re: Open SMS and email

done this

 

package mypackage;

import net.rim.blackberry.api.invoke.Invoke;
import net.rim.blackberry.api.invoke.MessageArguments;
import net.rim.device.api.ui.Screen;
import net.rim.device.api.ui.container.MainScreen;

public class Invite extends MainScreen {

	public Invite()
	{
        Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES,
        null );
        
        
	}

}

 

 

on click of invite a friend button, I call  UiApplication.getUiApplication().pushScreen(new Invite());.

 

 

 

http://postimage.org/image/a1os6vlwn/

 

 

It opens this page to me ( http://postimage.org/image/b50pyzhz9/ ) ...

How can I open the page where it can send sms/email directly.not this one

Developer
Posts: 16,992
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Open SMS and email

you have to use the correct arguments, null will not cover it.

for example
http://www.blackberry.com/developers/docs/7.1.0api/net/rim/blackberry/api/invoke/MessageArguments.ht...
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 813
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

Re: Open SMS and email

thank you simon, your a legend.
Developer
Posts: 813
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

Re: Open SMS and email

Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, new MessageArguments( MessageArguments.ARG_NEW_SMS) ); how can I open it with a messaged typed already ? like hey, please visit www.mysite.com

Highlighted
Developer
Posts: 16,992
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Open SMS and email

please open a new thread for your question next time, it is best to keep the 1 thread = 1 question principle to keep the overview Smiley Happy

iirc there is a problem opening a pre-populated sms, you can search the forum for more threads about that.
we use our own sms composer screen to avoid this issue, the UI is pretty simple anyhow.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter