Skip to main content

Re: Permissions

No replies
Anonymous

Actually, if you need to know whether the PushRegistry supports some
kind of connection, you should do:

try {
PushRegistry.registerConnection("sms://:79"); // example server
connection
}
catch(ConnectionNotFoundException cnfe) {
Alert a = new Alert("Connection type not supported");
Display.getDisplay(midlet).setCurrent(a);
}

Calling Class.forName() only tells you that PushRegistry is there (if a
device is MIDP 2.0, it always is), not which kinds of connection it
supports.

Second question: every operation that causes a security prompt to be
shown to the user (such as Connector.open()) can cause a
SecurityException. You could ask for the permissions in the JAD file,
but for that to work your midlet must be signed. In any case, make sure
you use try/catch(SecurityException se) when performing any sensitive
operation.

Daniel Rocha
Forum Nokia

-----Original Message-----
From: A mailing list for KVM discussion
[mailto:KVM-INTEREST@JAVA.SUN.COM] On Behalf Of ext
owner-kvm-interest@JAVA.SUN.COM
Sent: Wednesday, March 14, 2007 9:19 AM
To: KVM-INTEREST@JAVA.SUN.COM
Subject: Permissions

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.
[Message sent by forum member 'vahear' (vahear)]

http://forums.java.net/jive/thread.jspa?messageID=207826

========================================================================
===
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".