Skip to main content

Permissions

2 replies [Last post]
vahear
Offline
Joined: 2007-03-14

Hi all, my first question is
I know how get what MIDP and CLDC versions supports a device. Can you tel me, how find out(dinamicly), is a device support e.g PushRegistry for sms.
and the second question is
what cause SecureException on device, can it be permissions in jad file.
Thank you.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
ianstrain
Offline
Joined: 2006-12-15

try this

try {
Class.forName("javax.microedition.io.PushRegistry"); } catch (Exception e) {
System.out.println("it doesn't supports PushRegistry");
}

A SecurityException happens when the user selects no to the security dialog displayed when sending an sms or making a http connection etc

Gary

This fix would be insufficient, because the midp spec requires the
PushRegistry class to be present. JSR185 JTWI also mandates
at least alarm registrations and JSR120 WMA 1.1 SMS push
connections are supported. Does the phone claim to be JSR185
compliant?

If you have a signed suite the Permissions should be included in the
manifest for the jar. They indicate the connections that you would be
authorized
to use by the suite signer. If you have an unsigned suite then your
application
is basically untrusted. The user can grant permissions manually via
the Security Dialog prompts, but this can become burdensome in oneshot
acknowledgements on each message sent.

The best way to test if the connection type is supported is to open the
connection and catch the ConnectionNotFoundException. The same
exception should be thrown for PushRegistry.registerConnection
if the connection type is not supported for Push launch.

meinterest@mobileandembedded.org wrote:
> try this
>
> try {
> Class.forName("javax.microedition.io.PushRegistry"); } catch (Exception e) {
> System.out.println("it doesn't supports PushRegistry");
> }
>
> A SecurityException happens when the user selects no to the security dialog displayed when sending an sms or making a http connection etc
> [Message sent by forum member 'ianstrain' (ianstrain)]
>
> http://forums.java.net/jive/thread.jspa?messageID=207827
>
> ===========================================================================
> To unsubscribe, send email to listserv@java.sun.com and include in the body
> of the message "signoff KVM-INTEREST". For general help, send email to
> listserv@java.sun.com and include in the body of the message "help".
>

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".