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
New Developer
Posts: 6
Registered: ‎01-15-2009
My Device: Not Specified

Http Connection j2me BlackBerry

Hello,

I am developing an application that reads the feed of a website. I'm testing the application with the environment jde BlackBerry MDS simulator and everything works but when I install the application on my Blackberry 8520 does not work the link to the website and I do not get news.

 

I am developing the application with NetBeans and J2ME Polish.

 

I also tried to incorporate deviceside = false in the url but nothing doing.

 

Someone would know help me? I use the default apn this pack on my phone card

 

Thanks

Chiara

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Http Connection j2me BlackBerry

If the correct APN info (for your carrier) is set in your phone, then you can add ";deviceside=true" to your URL and this should work.

 

If not, you may have to explicitly set the APN also. See this KB article.

 

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/How_To_...

 

New Developer
Posts: 6
Registered: ‎01-15-2009
My Device: Not Specified

Re: Http Connection j2me BlackBerry

I put deviceside = true in my url but still nothing

I can not understand why .. permissions of the application are all the "Allow".

how can I solve my problem? I have the urge to run this section in my application

is a problem if my application is not signed?

 

thanks

chiara

 

Developer
Posts: 19,612
Registered: ‎07-14-2008
My Device: Not Specified

Re: Http Connection j2me BlackBerry

Have you reviewed the sticky Thread, especially the 'Required Reading'?

 

http://supportforums.blackberry.com/t5/Java-Development/Connecting-your-BlackBerry-http-and-socket-c...

New Developer
Posts: 6
Registered: ‎01-15-2009
My Device: Not Specified

Re: Http Connection j2me BlackBerry

Yes I read 'Required Reading' .. but I can not find a solution!!!!!

 

I read the feed of a site and make them nice graphically inside my application .. where is the connection is blocked!!

 

Any solution is welcome ..

 

chiara

Developer
Posts: 587
Registered: ‎01-19-2010
My Device: BOLD 9700 OS5.0.0.x on Rogers Canada
My Carrier: Rogers

Re: Http Connection j2me BlackBerry

[ Edited ]

Are you calling the connection on your main event Thread? I'm relatively sure that any connection (UDP, HTTP, etc) must be called from a separate Thread.

 

 

new Thread (new Runnable ()
{
public void run ()
{
connectToFeed ();
}
}).start ();

 

Or similarly...

 

 

public class FeedConnectionClass implements Runnable
{
  private Thread commThread;
  
  public FeedConnectionClass ()
  {
    commThread = new Thread (this, "commThread");
    commThread.start ();
  }
  
  public void run ()
  {
    connectToFeed ();
  }
}

 

 

----------------------------------------------------------------------------
chown -R us ./base
~J!NX
New Developer
Posts: 6
Registered: ‎01-15-2009
My Device: Not Specified

Re: Http Connection j2me BlackBerry

YES .. I will put the call to the connection in a separate thread but nothing doing..

 

HELP ... I do not know what to do ..

 

thanks

chiara