Preferred operations in netbeans mobility

I am writing a Java ME application that will use privileged operations such as messaging. By default, the user is prompted to confirm each of these operations, but I would like to run it as a background service.

The documentation says that it asks for permission in the jad file, I did this and I believe that it will work on the device. However, I would like to test this on the Netbeans Mobility Emulator.

I tried to sign the application as "trusted", but my emulated execution still asks the user for permission.

+3
source share
1 answer

The MIDP security model needs to be explained in two parts:

The phone (or emulator) contains a security policy.
Security policy consists of several domains.
each domain defines functional groups and root certificates.
the functional group decides which security settings (auto always agree, user always agrees, user agrees once ...) are available in the domain for which the protected API (i.e. messaging).

The domain that applies to your MIDlet depends on which root certificate trusts the certificate with which you signed your MIDlet.

Your problem is that there is a mismatch between what you consider the security settings for the API you want in the domain that you think belongs to your MIDlet and what is actually defined in the security policy of the emulator.

EDIT:

for WTK based emulators:

In the folder ${netbeans_installation_folder}\mobility8\WTK2.5.2\j2mewtk_template\appdb\ there are 3 _policy.txt* files.

Each of them contains a list of definitions of an "alias" and a list of "domain" definitions.

Make each domain the same content as the "maximum" domain.

After that, your emulator will no longer request any user rights .

If you have already used the emulator contained in Netbeans, you probably want to make the same changes to the ${netbeans_installation_folder}\mobility8\WTK2.5.2\appdb\ .

+2
source

All Articles