File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java Micro Edition and the fly likes j2me app not working on device Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "j2me app not working on device" Watch "j2me app not working on device" New topic
Author

j2me app not working on device

Danish Shaukat
Ranch Hand

Joined: Nov 16, 1999
Posts: 340
Hi !
I have made a simple network application using j2me. I'm using HttpConnection class for establishing the network connection. Basically it just sends a string to the server and fetches back a string from the server. I'm using a java servlet on Apache/Tomcat server. The application works fine using emulator and remote server. It takes around 3 seconds for the server to send back the response( when using emulator).
1) I have a java compliant cell phone and a GPRS network connection. But my application does not work on the device. I do not get any response from the server. What can be the possible reasons ?

2) Secondly how much time do you think it should take for the server to send back the response ( a string) to the client when using cell-phone and wireless network.
Regards
Danish
[ June 10, 2003: Message edited by: Danish Shaukat ]
Greg Schwartz
Ranch Hand

Joined: May 11, 2003
Posts: 132
What wireless service are you using?


Greg Schwartz<br />Mobatech, LLC<br />greg@mobatech.com<br /><a href="http://www.mobatech.com" target="_blank" rel="nofollow">www.Mobatech.com</a>
Fred Grott
Ranch Hand

Joined: Oct 05, 2002
Posts: 346
are using http or https to make the conncetion?


MobileBytes blog - Sharing Technology - My Programming Knols
Jean De Bulge
Greenhorn

Joined: Jun 25, 2003
Posts: 4
Hi,
I had a similar case... the problem was that the GPRS-Internet gateway server did not allow communication on port 8090... and my tomcat server was listening on that port... Maybe check that with your service provider?
Yours
J.
sing
Ranch Hand

Joined: Nov 29, 2001
Posts: 121
2) Secondly how much time do you think it should take for the server to send back the response ( a string) to the client when using cell-phone and wireless network.

Just wondering how much time if want to read a video from server and play to the phone. Someone developed similar MIDlet program? Any advice?
Thanks.
steffy
Burk Hufnagel
Ranch Hand

Joined: Oct 01, 2001
Posts: 814
    
    3
Originally posted by Fred Grott:
are using http or https to make the conncetion?

I thought https is only available under MIDP 2.0, or am I mistaken?


SCJP, SCJD, SCEA 5 "Any sufficiently analyzed magic is indistinguishable from science!" Agatha Heterodyne (Girl Genius)
sing
Ranch Hand

Joined: Nov 29, 2001
Posts: 121
I thought https is only available under MIDP 2.0, or am I mistaken?

you are right.
Burk Hufnagel
Ranch Hand

Joined: Oct 01, 2001
Posts: 814
    
    3
Does the server show any sign that it received the message?
Have you tried to simplify the problem? Can you just send a message to the server and see it appear without sending a reply?
Just trying to determine exactly (or as close as possible) what the problem is and where it is most likely happening.
Danish Shaukat
Ranch Hand

Joined: Nov 16, 1999
Posts: 340
Hi !
Sorry folks, i could not answer your questions. Actually the cell-phone is with my co-worker who is in another country.
Anyway i found out that the URL was being truncated( saw the server logs). For this reason the servlet was not running. The cell-phone ( a Samsung one) was truncating the URL. So now i am using Post method instead of Get and it works fine.
Sometimes things work perfectly well on emulators. But when you deploy the app on device many silly things come up.
Regards
Danish
[ June 25, 2003: Message edited by: Danish Shaukat ]
La Vish
Ranch Hand

Joined: Apr 17, 2002
Posts: 158
Sometimes things work perfectly well on emulators. But when you deploy the app on device many silly things come up.

Well said,Danish..


La Vish
SCJP 1.4, President 60s Club
Burk Hufnagel
Ranch Hand

Joined: Oct 01, 2001
Posts: 814
    
    3
Originally posted by Danish Shaukat:
Sometimes things work perfectly well on emulators. But when you deploy the app on device many silly things come up.

Reminds me of a favorite quote (thought I don't know who originally said it)...
"In theory there's no difference between theory and practice. But in practice there is."
 
 
subject: j2me app not working on device
 
Similar Threads
Send file across
J2me application
Midlet not working on phone
Does J2ME replace WAP/WML.?
J2ME deployment question