Symbian
Symbian OS Library

FAQ-0978 What are the protected API calls in the Java API for Bluetooth Wireless Technology (JSR 82)?

[Index][spacer] [Previous] [Next]



 

Classification: Java Category: J2ME Bluetooth APIs
Created: 02/12/2004 Modified: 02/12/2004
Number: FAQ-0978
Platform: Symbian OS v7.0s

Question:
The MIDP 2.0 security model classes certain API calls as protected. What are the protected API calls in the Java Bluetooth API?

Answer:
Under the MIDP 2.0 security model a signed MIDlet suite which contains MIDlets which open Bluetooth connections must explicitly request the appropriate permission in its MIDlet-Permissions attribute. To make outgoing (client) connections the MIDlet suite must request the

javax.microedition.io.Connector.bluetooth.client

permission. To accept incoming (server) connections the MIDlet suite must request the

javax.microedition.io.Connector.bluetooth.server

permission. For example the MIDlet-Permissions attribute entry in the application descriptor (JAD) file may be as follows.
    MIDlet-Permissions: javax.microedition.io.Connector.bluetooth.client, javax.microedition.io.Connector.bluetooth.server
    If the protection domain to which the signed MIDlet suite would be bound grants the requested permissions the MIDlet suite can be installed and the MIDlets it contains will be able to open Bluetooth client and server connections, either automatically, or with explicit user permission, depending upon the security policy in effect for that protection domain.

    Whether MIDlets in untrusted MIDlet suites can open Bluetooth connections depends on the security policy relating to the untrusted domain in force on the device. On the Nokia 6600 or the Sony Ericsson P900 untrusted MIDlets can access these APIs with User permission, the default being set to session (permission is only requested the first time the MIDlet accesses the protected API and is henceforth granted for duration of the current session).