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
Alfury
Posts: 44
Registered: ‎08-11-2008
My Device: Not Specified

Re: HttpConnection in a j2me application

Hi!

 

Excuse me, how are you doing that???  It is really a problem related with the canvas? Please, could you explain to me with your "dummy code" Im kinda crazy! I would thank you for life!  Thx in advance

Please use plain text.
New Developer
cstarling
Posts: 7
Registered: ‎08-04-2008
My Device: Not Specified

Re: HttpConnection in a j2me application

@Alfury

 

I don't really know why it's a problem, i only noticed that the yes/no-prompt is frozen if my application is in canvas mode.
Therefore i'm now making a request

 

----
ContentConnection connection = (ContentConnection) Connector.open("http://www.google.de");
connection.close();
----

 

at programstart, the Yes/No-prompt can be switched to Yes and all working fine.
This is only a workaround ;-)

 

cstarling

Please use plain text.
Administrator
MSohm
Posts: 14,430
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: HttpConnection in a j2me application

Are you creating your connection in its own thread?

 

Support - Application stops responding when opening a connection
Article Number: DB-00159

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

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
New Developer
Alfury
Posts: 44
Registered: ‎08-11-2008
My Device: Not Specified

Re: HttpConnection in a j2me application

[ Edited ]

Hi again!

 

Ive got to connect with the server but the problem rightnow is that my wrapper replies to me there is nothing sent, I mean, you can see a request, but no data arrives at the server; I mean, the communication opens right but dont send anything so....can anyone tell me what can be happening? It´s working at the emulator with MDS. Other question is I use the javax.microedition.* to send sms´s but my application, Ive made a test and closes it when Im trying to send a simple sms to myself.....could anyone tell me whats happening?? Thx in advance to everyone thx so much

 

Kind regards

Message Edited by Alfury on 08-12-2008 03:25 AM
Please use plain text.
Administrator
MSohm
Posts: 14,430
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: HttpConnection in a j2me application

I recommend connecting the BlackBerry to the BlackBerry JDE and step through your application to see what is happening.  To do so, connect the BlackBerry via USB, click on the Debug menu and select Attach To, Device then your PIN.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
New Developer
Alfury
Posts: 44
Registered: ‎08-11-2008
My Device: Not Specified

Re: HttpConnection in a j2me application

Hi again!

 

 

Ive got make the communication in a proper way, I dont really know what was happening; now, my question is, please, how Ive to create the .cod over the air? Ive got a server which makes the applications OTA so I need to generate OTA the blackberry cod file; Ive to put some data into the jad everytime and this file changes all the time so, please, can anyone tell to me how can I deal with this? How Ive to download the application to the blackberry device? using the jad? using directly the cod? using both jar and jad? please help

 

 

Thx in advance, kind regards 

Please use plain text.
Administrator
MSohm
Posts: 14,430
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: HttpConnection in a j2me application

You can place your JAD and COD files on a web server and open the JAD file in the BlackBerry Browser.  Please see the Deploying Java Applications white paper for more information.

 

http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&objId=832210&objAction=browse&s...

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
New Developer
Alfury
Posts: 44
Registered: ‎08-11-2008
My Device: Not Specified

Re: HttpConnection in a j2me application

Hi!

 

 

Ive done a method which builds the cod and the jad OTA in the server; the problem now is, when I download the application it does not communicate with internet....but if I load the application via PC into the device, it works perfectly; can anyone tell to me what can be happening? thx in advance

 

UPDATE : can it be a problem using rpac? thx 

Please use plain text.
Administrator
MSohm
Posts: 14,430
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: HttpConnection in a j2me application

What type of connection are you making and what route is it being made over (direct TCP, BlackBerry Enterprise Server or WAP Gateway)?

 

What behaviour are you seeing?  What exception is being thrown?

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
New Developer
Alfury
Posts: 44
Registered: ‎08-11-2008
My Device: Not Specified

Re: HttpConnection in a j2me application

Hi again (and thank you so much MSohm!)

 

Its an HttpConnection over tcp; I dont use BIS or BES. The problem is, I load the cod using javaloader in the command prompt at windows and everything is working ok; when I build the cod in my OTA service, it does not communicate; The difference Ive noticed is in the jads I generate; in the OTA jad I include permissions and the verisign certificate Im using to sign j2me applications; please can you tell me what is happening?

 

sorry for being bored!

 

kind regards 

Please use plain text.