Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

the connection question

 
Burak Celebi
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

When the my midlet asks "... wants to send and receive data using the
network... is it OK?" and once i click "no", it always executes the
catch block and never asks again the question. How can i overcome this
problem?

Related code is below:

-----------------------------------
public void run() {
try {
AnObject obj = new AnObject(); // this object makes an HttpConnection
display.setCurrent(obj);
}

catch (SecurityException e) {
Alert alert = new Alert("Error", "You are not authorized
to access the restricted API", null, AlertType.ERROR);
alert.setTimeout(Alert.FOREVER);
display.setCurrent(alert, this );
}
}
-----------------------------------

Thanks in advance
[ February 08, 2005: Message edited by: Burak Celebi ]
 
William Frantz
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a device specific question. It will vary from one phone to the next. My phone has menu options in the Java Application Manager to permanently enable/disable network access.

What device are you using?

William Frantz
http://sprintdevelopers.com
 
Kirk Bateman
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Specifically with Nokia devices, it seems they will ask once, if you deny access then it wont ask again until you have exited the application and restarted. I think thats also true of Sony Ericsson devices...

Cheers

Kirk
 
Burak Celebi
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much William Frantz and Kirk Bateman.

> What device are you using?
I was just trying the application on an emulator
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic