If you are developing a J2ME application that connects to the Internet and are using a Mobile Emulator then you will invariably have to put up with the repeated messages that ask if it is OK for your phone to use Airtime (i.e. connect to the Internet). Not only is this very annoying but it also has the potential to prevent proper automated testing from being carried out.
This actually happens when your application has not been properly signed but only seems to happen in the Emulator (it does not happen on my Nokia E70). Until now, I was of the impression that the only way around this was to purchase a full digital signing pack from the likes of VeriSign etc. Gladly, this is not the case …
- Start the Sun Java Wireless Toolkit “KToolbar” application and select Edit, Preferences
- Locate the Security category and select the following settings
- Security Policy: MSA
- Security Domain: manufacturer
- Save these preferences
- From your NetBeans project, select the project properties.
- Locate the Signing settings (inside the Build settings) and select the following settings:
- Sign Distributon: Yes (or checked)
- Keystore: Built-in keystore
- Alias: untrusted
- You might also need to Export this key to the Java SDK/Emulator using the button provided
- Save these settings and rebuild your project
Hopefully the next time you launch your application from the emulator will no longer ask permission to use Airtime.