Home | History | Annotate | Download | only in bluetooth

Lines Matching defs:bluetooth

17 package android.bluetooth;
45 * Represents the local device Bluetooth adapter. The {@link BluetoothAdapter}
46 * lets you perform fundamental Bluetooth tasks, such as initiate
50 * devices, and start a scan for Bluetooth LE devices.
52 * <p>To get a {@link BluetoothAdapter} representing the local Bluetooth
59 * Bluetooth actions. Once you have the local adapter, you can get a set of
65 * Bluetooth LE devices with {@link #startLeScan(LeScanCallback callback)}.
68 * Most methods require the {@link android.Manifest.permission#BLUETOOTH}
74 * <p>For more information about using Bluetooth, read the
75 * <a href="{@docRoot}guide/topics/wireless/bluetooth.html">Bluetooth</a> developer guide.</p>
96 * Broadcast Action: The state of the local Bluetooth adapter has been
98 * <p>For example, Bluetooth has been turned on or off.
102 * <p>Requires {@link android.Manifest.permission#BLUETOOTH} to receive.
106 "android.bluetooth.adapter.action.STATE_CHANGED";
117 "android.bluetooth.adapter.extra.STATE";
127 "android.bluetooth.adapter.extra.PREVIOUS_STATE";
130 * Indicates the local Bluetooth adapter is off.
134 * Indicates the local Bluetooth adapter is turning on. However local
140 * Indicates the local Bluetooth adapter is on, and ready for use.
144 * Indicates the local Bluetooth adapter is turning off. Local clients
151 * This activity will also request the user to turn on Bluetooth if it
155 * this Bluetooth adapter when they perform a discovery.
170 * <p>Requires {@link android.Manifest.permission#BLUETOOTH}
174 "android.bluetooth.adapter.action.REQUEST_DISCOVERABLE";
183 "android.bluetooth.adapter.extra.DISCOVERABLE_DURATION";
187 * Bluetooth.
188 * <p>This system activity will return once Bluetooth has completed turning
189 * on, or the user has decided not to turn Bluetooth on.
193 * will be {@link android.app.Activity#RESULT_OK} if Bluetooth has been
197 * for global notification whenever Bluetooth is turned on or off.
198 * <p>Requires {@link android.Manifest.permission#BLUETOOTH}
202 "android.bluetooth.adapter.action.REQUEST_ENABLE";
205 * Broadcast Action: Indicates the Bluetooth scan mode of the local Adapter
210 * <p>Requires {@link android.Manifest.permission#BLUETOOTH}
214 "android.bluetooth.adapter.action.SCAN_MODE_CHANGED";
223 public static final String EXTRA_SCAN_MODE = "android.bluetooth.adapter.extra.SCAN_MODE";
232 "android.bluetooth.adapter.extra.PREVIOUS_SCAN_MODE";
236 * Bluetooth adapter. Therefore this device is neither discoverable
237 * nor connectable from remote Bluetooth devices.
242 * local Bluetooth adapter. Therefore this device is not discoverable from
243 * remote Bluetooth devices, but is connectable from remote devices that
249 * Bluetooth adapter. Therefore this device is both discoverable and
250 * connectable from remote Bluetooth devices.
256 * Broadcast Action: The local Bluetooth adapter has started the remote
259 * by a page scan of each new device to retrieve its Bluetooth name.
261 * remote Bluetooth devices are found.
263 * remote Bluetooth devices should not be attempted while discovery is in
267 * <p>Requires {@link android.Manifest.permission#BLUETOOTH} to receive.
271 "android.bluetooth.adapter.action.DISCOVERY_STARTED";
273 * Broadcast Action: The local Bluetooth adapter has finished the device
275 * <p>Requires {@link android.Manifest.permission#BLUETOOTH} to receive.
279 "android.bluetooth.adapter.action.DISCOVERY_FINISHED";
282 * Broadcast Action: The local Bluetooth adapter has changed its friendly
283 * Bluetooth name.
284 * <p>This name is visible to remote Bluetooth devices.
287 * <p>Requires {@link android.Manifest.permission#BLUETOOTH} to receive.
291 "android.bluetooth.adapter.action.LOCAL_NAME_CHANGED";
294 * intents to request the local Bluetooth name.
296 public static final String EXTRA_LOCAL_NAME = "android.bluetooth.adapter.extra.LOCAL_NAME";
300 * Bluetooth adapter to a profile of the remote device. When the adapter is
310 * which displays an icon to display whether Bluetooth is connected or not
322 * <p>Requires {@link android.Manifest.permission#BLUETOOTH} to receive.
326 "android.bluetooth.adapter.action.CONNECTION_STATE_CHANGED";
334 "android.bluetooth.adapter.extra.CONNECTION_STATE";
342 "android.bluetooth.adapter.extra.PREVIOUS_CONNECTION_STATE";
370 * Get a handle to the default local Bluetooth
371 * <p>Currently Android only supports one Bluetooth adapter, but the API
374 * @return the default local adapter, or null if Bluetooth is not supported
384 Log.e(TAG, "Bluetooth binder is null");
396 throw new IllegalArgumentException("bluetooth manager service is null");
406 * Get a {@link BluetoothDevice} object for the given Bluetooth hardware
408 * <p>Valid Bluetooth hardware addresses must be upper case, in a format
410 * available to validate a Bluetooth address.
414 * @param address valid Bluetooth MAC address
422 * Get a {@link BluetoothDevice} object for the given Bluetooth hardware
424 * <p>Valid Bluetooth hardware addresses must be 6 bytes. This method
429 * @param address Bluetooth MAC address (6 bytes)
434 throw new IllegalArgumentException("Bluetooth address must have 6 bytes");
441 * Return true if Bluetooth is currently enabled and ready for use.
444 * <p>Requires {@link android.Manifest.permission#BLUETOOTH}
459 * Get the current state of the local Bluetooth adapter.
465 * <p>Requires {@link android.Manifest.permission#BLUETOOTH}
467 * @return current state of Bluetooth adapter
487 * Turn on the local Bluetooth adapter&mdash;do not use without explicit
488 * user action to turn on Bluetooth.
489 * <p>This powers on the underlying Bluetooth hardware, and starts all
490 * Bluetooth system services.
491 * <p class="caution"><strong>Bluetooth should never be enabled without
492 * direct user consent</strong>. If you want to turn on Bluetooth in order
495 * user permission to turn on Bluetooth. The {@link #enable()} method is
525 * Turn off the local Bluetooth adapter&mdash;do not use without explicit
526 * user action to turn off Bluetooth.
527 * <p>This gracefully shuts down all Bluetooth connections, stops Bluetooth
528 * system services, and powers down the underlying Bluetooth hardware.
529 * <p class="caution"><strong>Bluetooth should never be disabled without
556 * Turn off the local Bluetooth adapter and don't persist the setting.
574 * Returns the hardware address of the local Bluetooth adapter.
576 * <p>Requires {@link android.Manifest.permission#BLUETOOTH}
578 * @return Bluetooth hardware address as string
588 * Get the friendly Bluetooth name of the local Bluetooth adapter.
589 * <p>This name is visible to remote Bluetooth devices.
590 * <p>Requires {@link android.Manifest.permission#BLUETOOTH}
592 * @return the Bluetooth name, or null on error
602 * enable or disable Bluetooth HCI snoop log.
621 * Get the UUIDs supported by the local Bluetooth adapter.
623 * <p>Requires {@link android.Manifest.permission#BLUETOOTH}
625 * @return the UUIDs supported by the local Bluetooth Adapter.
639 * Set the friendly Bluetooth name of the local Bluetooth adapter.
640 * <p>This name is visible to remote Bluetooth devices.
641 * <p>Valid Bluetooth names are a maximum of 248 bytes using UTF-8
644 * <p>If Bluetooth state is not {@link #STATE_ON}, this API
645 * will return false. After turning on Bluetooth,
650 * @param name a valid Bluetooth name
664 * Get the current Bluetooth scan mode of the local Bluetooth adapter.
665 * <p>The Bluetooth scan mode determines if the local adapter is
666 * connectable and/or discoverable from remote Bluetooth devices.
671 * <p>If Bluetooth state is not {@link #STATE_ON}, this API
672 * will return {@link #SCAN_MODE_NONE}. After turning on Bluetooth,
675 * <p>Requires {@link android.Manifest.permission#BLUETOOTH}
690 * Set the Bluetooth scan mode of the local Bluetooth adapter.
691 * <p>The Bluetooth scan mode determines if the local adapter is
692 * connectable and/or discoverable from remote Bluetooth devices.
701 * <p>If Bluetooth state is not {@link #STATE_ON}, this API
702 * will return false. After turning on Bluetooth,
759 * Bluetooth name.
764 * BluetoothDevice#ACTION_FOUND} to be notified as remote Bluetooth devices
767 * remote Bluetooth devices should not be attempted while discovery is in
775 * <i>discoverable</i> (inquiry scan enabled). Many Bluetooth devices are
777 * <p>If Bluetooth state is not {@link #STATE_ON}, this API
778 * will return false. After turning on Bluetooth,
798 * <p>Because discovery is a heavyweight procedure for the Bluetooth
801 * android.bluetooth.BluetoothSocket#connect()}. Discovery is not managed by
805 * <p>If Bluetooth state is not {@link #STATE_ON}, this API
806 * will return false. After turning on Bluetooth,
823 * Return true if the local Bluetooth adapter is currently in the device
826 * remote Bluetooth devices should not be attempted while discovery is in
833 * <p>If Bluetooth state is not {@link #STATE_ON}, this API
834 * will return false. After turning on Bluetooth,
837 * <p>Requires {@link android.Manifest.permission#BLUETOOTH}.
854 * <p>If Bluetooth state is not {@link #STATE_ON}, this API
855 * will return an empty set. After turning on Bluetooth,
858 * <p>Requires {@link android.Manifest.permission#BLUETOOTH}.
876 * Get the current connection state of the local Bluetooth adapter.
877 * This can be used to check whether the local Bluetooth adapter is connected
878 * to any profile of any other remote Bluetooth Device.
900 * This function can be used to check whether the local Bluetooth adapter
905 * <p>Requires {@link android.Manifest.permission#BLUETOOTH}.
926 * Create a listening, secure RFCOMM Bluetooth socket.
935 * @throws IOException on error, for example Bluetooth not available, or
953 * Create a listening, secure RFCOMM Bluetooth socket with Service Record.
961 * UUID, service name, and auto-assigned channel. Remote Bluetooth devices
967 * <p>Requires {@link android.Manifest.permission#BLUETOOTH}
971 * @throws IOException on error, for example Bluetooth not available, or
980 * Create a listening, insecure RFCOMM Bluetooth socket with Service Record.
982 * vulnerable to Man In the Middle attacks. For Bluetooth 2.1 devices,
984 * For legacy devices (pre Bluetooth 2.1 devices) the link will not
992 * UUID, service name, and auto-assigned channel. Remote Bluetooth devices
998 * <p>Requires {@link android.Manifest.permission#BLUETOOTH}
1002 * @throws IOException on error, for example Bluetooth not available, or
1012 * RFCOMM Bluetooth socket with Service Record.
1017 * For example, for Bluetooth 2.1 devices, if any of the devices does not have
1021 * For Bluetooth 2.1 devices, the link will be encrypted, as encryption is mandartory.
1023 * Bluetooth Core Specification version 2.1 + EDR.
1029 * UUID, service name, and auto-assigned channel. Remote Bluetooth devices
1035 * <p>Requires {@link android.Manifest.permission#BLUETOOTH}
1039 * @throws IOException on error, for example Bluetooth not available, or
1069 * @throws IOException On error, for example Bluetooth not available, or
1090 * @throws IOException On error, for example Bluetooth not available, or
1112 Bluetooth not available, or
1130 * <p>Requires {@link android.Manifest.permission#BLUETOOTH}
1172 * @param profile The Bluetooth profile; either {@link BluetoothProfile#HEALTH},
1289 * Enable the Bluetooth Adapter, but don't auto-connect devices
1305 * Enable control of the Bluetooth Adapter for a single application.
1307 * <p>Some applications need to use Bluetooth for short periods of time to
1312 * Bluetooth disabled only when no one else is using it. There will be no UI
1313 * shown to the user while bluetooth is being enabled. Any user action will
1314 * override this call. For example, if user wants Bluetooth on and the last
1315 * user of this API wanted to disable Bluetooth, Bluetooth will not be
1322 * The callback will be called with the current state of Bluetooth.
1324 * reason. If Bluetooth is already on and if this function is called to turn
1327 * <p>Requires {@link android.Manifest.permission#BLUETOOTH}
1389 * Validate a String Bluetooth address, such as "00:43:A8:23:10:F0"
1392 * @param address Bluetooth address as string
1455 * Bluetooth hardware. 0 if no RSSI value is available.
1463 * Starts a scan for Bluetooth LE devices.
1478 * Starts a scan for Bluetooth LE devices, looking for devices that
1526 * Stops an ongoing Bluetooth LE device scan.
1544 * Bluetooth GATT interface callbacks