How to close J2ME HTTP Connection on Nokia 6230i. I use this line to open HTTP Connection :
c = (HttpConnection) Connector.open (url2open.trim());
the connection successfuly opened, (marked with "G symbol in the box" in top left of the screen, meaning the GPRS connection is open)
But when I try to close the connection using: c.close(),
the G in the box symbol is still exist (connection still open)....
I have tried to close all Stream before close the connection.... it can be closed with no exception, but the G symbol still exist...
Nothing, there isn’t anything wrong with the connection, the G will usually hover about for around 30 seconds.
I actually find it more handy not to close the connection and leave it open (well I actually close it right before a read). Since GPRS is (or should be) charge by the amount transferred not by time this is not a problem.
A big slice of time is used actually creating and opening the initial connection so keeping it live is not a bad idea.