Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Developer
gatestown
Posts: 47
Registered: 12-03-2009
My Carrier: Sprint

Creating Button for Calling Web Site

I'm trying to figure out how to create a button in my app that would go to a web site.  Below is a button already set up in my app:

 

    //Button to create email message
    ButtonField btnSubmit = new ButtonField("Create eMail", ButtonField.CONSUME_CLICK){
        protected boolean navigationClick( int status, int time ){
            Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES,new MessageArguments    (MessageArguments.ARG_NEW,myemail@address.com ","Subject Line",ef3.getText()+"\n\n"+"From: "+ef.getText()+"\n"+"Email: "+ef1.getText()+"\n"+"Location: "+ef2.getText()+" "+"\n"));
            return true;
        }

 

 

Please use plain text.
Developer
br14
Posts: 415
Registered: 06-24-2008

Re: Creating Button for Calling Web Site

[ Edited ]

Try the Browser api rather than Invoke.

 

Simplisticly you should first use Browser to get a BrowserSession, then use the BrowserSession to load your URI.

 

However, as always with BlackBerry it's not quite that straightforward. Check out the following link from the Developer Knowledgebase

 

How To - Invoke the Browser

 

I'm guessing you'll want to read from "BlackBerry Device Software 4.0 and later" on.

 

 

 

Please use plain text.