• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

stuck at 'is it ok to use airtime'

 
le ouragan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been trying to create a midlet that connects to a servlet on my system. but everytime i try and execute it, it asks me the above question. wen i press yes nothing happens. no exceptions no errors. just gets stuck there.
I have tried adding permissions. however, the jad and manifest files dont retain them on rebuilding the app.
any help watsoever will he greatly appreciated.
 
Paul Clapham
Sheriff
Posts: 21583
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"le ouragan", welcome to the JavaRanch.

We're friendly here, but we do require members to have valid display names.

Display names must be at least two words: your first name, a space, then your last name. Fictitious names are not allowed.

Please edit your profile and correct your display name since accounts with display names will be deleted.
 
Girish Nagaraj
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you getting any warning?

Write code for connecting to servlet in a seperate Thread and try...

Even I was getting the same problem, I had given all the reqd. permissions
when I wrote the code for connecting to server and getiing image in a seperate thread it started working.
 
Theodore Casser
Ranch Hand
Posts: 1902
Hibernate Netbeans IDE PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree - it sounds like the thread that's running the application is locking up while waiting for a response. but having more informaiton, like if it's throwing an exception in the emulator or if moving the connection code to a separate thread from the rest of the application helps (or even if the app is already multi-threaded) would allow for more help from this end.
 
khalandar pasha
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just create the connection in a new thread. And every thing works fine. I had faced a similar problem with sony K750i (for a HTTP Connection) but once you make the connection in a new thread everything works fine
 
Tif Poon
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

Follow the steps below:
http://www.mernin.com/blog/?p=21

and then insert your codes into a new Thread:
////////////////////////////////////////////////////////////////////////////
new Thread() {
public void run() {
// your WS code
}
}.start();
////////////////////////////////////////////////////////////////////////////
everything should work fine then.

Goodluck!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic