Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Midlet not working on phone

 
Danish Shaukat
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi !
I have made a midlet which sends usedID, password, emailAddress to a servlet using Httpconnection. On server if the userID & password are verified then an email is sent to the specified address. If email is sent user is shown a confirmatory screen. If account is not authenticated the user is asked to enter usedID and password again. Actually a string is sent from the server to the midlet and based on this string the next screen is shown.
The problem is that when i press the "Send" button the email is sent but the next screen does not appear. Or in the other case if userID/password are not verified then Register Again screen does not appear. So I don't get a new screen, the old screen stays there.
This means that the string that has to be sent from server to client is not reaching the client. I have seen the logs on the server and the servlet seems to work well. My best guess right now can be that the connection times out or something of this sort happens which prevents the string from reaching the client.
When i run this midlet using emulator i do not get any problem, Everything works fine. But this problem occurs when i run my midlet from a cell-phone.
So how do i solve this problem ?
Regards
Danish
 
Danish Shaukat
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All my code that sets up a network connection and receives a message from the server is in a method called sendData().
I enclosed all code of this method in a try block and in the catch block the message generated by the excepion is being stored in a string. After doing this I again tested the midlet on my phone and it worked fine.
I don't really understand why it is working now.
 
Tajinder Singh
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi danish
actually i too was trying to do the same thing but the register again screen or the thank u sscreen were not being displayed .... could u kindly send me the code for this
tajinder
 
Danish Shaukat
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi !
I took help from the following web site:
http://wireless.java.sun.com/midp/samples/index.html#nw
And we tested the application again. We were having problems earlier due to some network failure. The application was working fine when we tested again.
Regards
Danish
[ July 05, 2003: Message edited by: Danish Shaukat ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic