This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Java Micro Edition and the fly likes how to disable the dialog Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "how to disable the dialog " Press ok to send data ..."" Watch "how to disable the dialog " Press ok to send data ..."" New topic

how to disable the dialog " Press ok to send data ..."

sun shine

Joined: May 20, 2004
Posts: 2

I m a student and new to j2me. I have developed an application in j2me which interact with the server when required. Every time when I make connection and send data to server , the prompt is shown to confirming to send data. I want to disable this thing. I m using midp1.0 . How can i do this ??? Plz help me. I m using Nokia 6600.

sun shine
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17271

Doesn't the dialog have an option to accept all the time, then you only have that one time.

That dialog is built in to the security mechanism. It stops from bad MIDlets making Network connections without the User allowing it. It is a User choice decision.

This is because if you didn't have this, then MIDlets would make these network calls without the user knowing, and as we all know network calls use up airtime that costs the user money.


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
sun shine

Joined: May 20, 2004
Posts: 2
But is there any way to disable it???
Michael Yuan
Ranch Hand

Joined: Mar 07, 2002
Posts: 1427
Originally posted by sun shine:
But is there any way to disable it???

Nokia 6600 supports MIDP 2.0. You can sign your MIDlet suite using a trusted certificate to get around the security limits. Beyond that, like Mark said, this is a security feature. It would be worthless if a user can somehow get around it.

Seam Framework:
Punit Raizada
Ranch Hand

Joined: Mar 20, 2004
Posts: 156

This is a security feature...

But if you are only testing and getting annoyed by the popup on the Nokia 6600 then do this
1) Navigate to the Manager on the device
2) Select your application from the list
3) click on Options and select Settings
4) On the Network item select -"Ask the first time only"

So now when u launch the MIDlet it will ask you only once and the other connections will proceed without a popup.

For deploying such a MIDlet u will neeed a certificate as mentioned above and also add the methods that u need to the MIDlets-permissions attribute in the Jad file

hope this helps

SCJP 1.4
Everything that can go wrong will go wrong -Murphy
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: how to disable the dialog " Press ok to send data ..."
jQuery in Action, 3rd edition