|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.bluetooth.Database
public final class Database
The Android Bluetooth API is not finalized, and *will* change. Use at your own risk. A low-level API to the Service Discovery Protocol (SDP) Database. Allows service records to be added to the local SDP database. Once added, these services will be advertised to remote devices when they make SDP queries on this device. Currently this API is a thin wrapper to the bluez SDP Database API. See: http://wiki.bluez.org/wiki/Database http://wiki.bluez.org/wiki/HOWTO/ManagingServiceRecords
| Method Summary | |
|---|---|
int |
addServiceRecord(byte[] record)
Add a new service record. |
int |
addServiceRecordFromXml(String record)
Add a new service record, using XML. |
int |
advertiseRfcommService(RfcommSocket socket,
String serviceName,
UUID uuid)
Advertise a service with an RfcommSocket. |
protected void |
finalize()
Called by the virtual machine when there are no longer any (non-weak) references to the receiver. |
static Database |
getInstance()
Singelton accessor |
void |
removeServiceRecord(int handle)
Remove a service record. |
void |
updateServiceRecord(int handle,
byte[] record)
Update an exisiting service record. |
void |
updateServiceRecordFromXml(int handle,
String record)
Update an exisiting record, using XML. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
protected void finalize()
throws Throwable
ObjectNote: The virtual machine assumes that the implementation in class Object is empty.
finalize in class ObjectThrowable - The virtual machine ignores any exceptions which are
thrown during finalization.public static Database getInstance()
public int advertiseRfcommService(RfcommSocket socket,
String serviceName,
UUID uuid)
throws IOException
socket - The rfcomm socket to advertise (by channel).serviceName - A short name for this serviceuuid - Unique identifier for this service, by which clients
can search for your service
IOException
public int addServiceRecord(byte[] record)
throws IOException
record - The byte[] record
IOException
public int addServiceRecordFromXml(String record)
throws IOException
record - The record as an XML string
IOException
public void updateServiceRecord(int handle,
byte[] record)
handle - Handle to exisiting recordrecord - The updated byte[] record
public void updateServiceRecordFromXml(int handle,
String record)
handle - Handle to exisiting recordrecord - The record as an XML string.public void removeServiceRecord(int handle)
handle - Handle to exisiting record to be removed
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||