Method Summary |
|
public String | askFriendlyNameSync(String addr) Retrieves friendly name from a remote device synchronously. |
public boolean | authenticateSync(String addr) Performs remote device authentication synchronously. |
public boolean | cancelInquiry(DiscoveryListener listener) Removes the device from inquiry mode. |
native public boolean | enable() Enables Bluetooth radio. |
public boolean | encryptSync(String addr, boolean enable) Sets encryption mode synchronously. |
native public int | getAccessCode() Retrieves the inquiry access code that the local Bluetooth device is
scanning for during inquiry scans. |
native public int | getDeviceClass() Returns class of device including service classes. |
public static synchronized BluetoothStack | getEnabledInstance() Returns a BluetoothStack object and guarantees that Bluetooth
radio is on. |
public static synchronized BluetoothStack | getInstance() Returns a BluetoothStack object. |
native public String | getLocalAddress() Returns Bluetooth address of the local device. |
native public String | getLocalName() Returns user-friendly name for the local device. |
native public boolean | isEnabled() Checks if the Bluetooth radio is enabled. |
void | onAuthenticationComplete(int handle, boolean result) Called when an authentication request is completed. |
void | onEncryptionChange(int handle, boolean result) Called when a set encryption request is completed. |
void | onInquiryComplete(boolean success) Called when an inquiry request is completed. |
void | onInquiryResult(InquiryResult result) Called when an inquiry result is obtained. |
void | onNameRetrieve(String addr, String name) Called when a name retrieval request is completed. |
public void | pollEvents() Checks for Bluetooth events and processes them. |
native protected int | readData(byte[] data) Reads binary event data from the native porting layer. |
abstract protected BluetoothEvent | retrieveEvent() Retrieves Bluetooth event. |
native public boolean | setAccessCode(int accessCode) Sets the inquiry access code that the local Bluetooth device is
scanning for during inquiry scans. |
native public boolean | setServiceClasses(int classes) Sets major service class bits of the device. |
public boolean | startInquiry(int accessCode, DiscoveryListener listener) Places the device into inquiry mode. |
public synchronized void | startPolling() Starts a supplementary polling thread. |
public synchronized void | stopPolling() Cancels event polling for one request. |
native protected static String | stringUTF8(byte[] buffer, int offset, int length) Creates Java String object from UTF-8 encoded string. |