diff options
author | Scott Main <smain@google.com> | 2009-11-03 18:17:59 -0800 |
---|---|---|
committer | Scott Main <smain@google.com> | 2009-11-09 18:09:12 -0800 |
commit | 9fab0aef19a4633d2e4670564e5d7ae9e52fe11f (patch) | |
tree | d39ce12d4517db2e75d20322dec6c132d565023d /core/java/android/bluetooth/BluetoothAdapter.java | |
parent | 0e08055aa31c752732005fc48b09ee470a2c4822 (diff) | |
download | frameworks_base-9fab0aef19a4633d2e4670564e5d7ae9e52fe11f.zip frameworks_base-9fab0aef19a4633d2e4670564e5d7ae9e52fe11f.tar.gz frameworks_base-9fab0aef19a4633d2e4670564e5d7ae9e52fe11f.tar.bz2 |
docs: add more documentation for the bluetooth apis.
more descriptions for some of the classes and a new
overview and pseudo-code example for using BT APIs
in the package summary.
Diffstat (limited to 'core/java/android/bluetooth/BluetoothAdapter.java')
-rw-r--r-- | core/java/android/bluetooth/BluetoothAdapter.java | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/core/java/android/bluetooth/BluetoothAdapter.java b/core/java/android/bluetooth/BluetoothAdapter.java index ff48583..595156f 100644 --- a/core/java/android/bluetooth/BluetoothAdapter.java +++ b/core/java/android/bluetooth/BluetoothAdapter.java @@ -36,13 +36,30 @@ import java.util.Set; import java.util.UUID; /** - * Represents the local Bluetooth adapter. + * Represents the local device Bluetooth adapter. The {@link BluetoothAdapter} + * lets you perform fundamental Bluetooth tasks, such as initiate + * device discovery, query a list of bonded (paired) devices, + * instantiate a {@link BluetoothDevice} using a known MAC address, and create + * a {@link BluetoothServerSocket} to listen for connection requests from other + * devices. * - * <p>Use {@link #getDefaultAdapter} to get the default local Bluetooth - * adapter. + * <p>To get a {@link BluetoothAdapter} representing the local Bluetooth + * adapter, call the static {@link #getDefaultAdapter} method. + * Fundamentally, this is your starting point for all + * Bluetooth actions. Once you have the local adapter, you can get a set of + * {@link BluetoothDevice} objects representing all paired devices with + * {@link #getBondedDevices()}; start device discovery with + * {@link #startDiscovery()}; or create a {@link BluetoothServerSocket} to + * listen for incoming connection requests with + * {@link #listenUsingRfcommWithServiceRecord(String,UUID)}. * - * <p>Use the {@link BluetoothDevice} class for operations on remote Bluetooth - * devices. + * <p class="note"><strong>Note:</strong> + * Most methods require the {@link android.Manifest.permission#BLUETOOTH} + * permission and some also require the + * {@link android.Manifest.permission#BLUETOOTH_ADMIN} permission. + * + * {@see BluetoothDevice} + * {@see BluetoothServerSocket} */ public final class BluetoothAdapter { private static final String TAG = "BluetoothAdapter"; |