Friday 20 September 2013


1.What is Blue Tooth?

Bluetooth is a wireless technology standard for exchanging data over short distances from fixed and mobile devices, creating personal area networks with high levels of security.

Or

Bluetooth is a way to exchange data with other devices without any wired connection.


2.What Android Provides?


Bluetooth API to perform several tasks such as:
  1. Scan for other Bluetooth devices (including Bluetooth Low Energy devices)
  2. Query the local Bluetooth adapter for paired Bluetooth devices
  3. Establish RFCOMM channels/sockets
  4. Connect to specified sockets on other devices
  5. Transfer data to and from other devices
  6. Manage multiple connections


3.What Android BlueTooth API Provides?

The android.bluetooth package provides a lot of interfaces classes to work with bluetooth such as:


  1. BluetoothAdapter
  2. BluetoothDevice
  3. BluetoothAssignedNumbers
  4. BluetoothServerSocket
  5. BluetoothSocket
  6. BluetoothProfile
  7. BluetoothClass
  8. BluetoothHeadset
  9. BluetoothProfile.ServiceListener
  10. BluetoothA2dp
  11. BluetoothHealth
  12. BluetoothHealthCallback
  13. BluetoothHealthAppConfiguration

4.About BlueTooth Adapter Class?

BluetoothAdapter  Represents the local device Bluetooth adapter. 
BluetoothAdapter class can be used to perform fundamental tasks such as query a list of paired (bonded) devices, create a BluetoothServerSocket instance to listen for connection requests, initiate device discovery etc.

5.What are the Constants of Bluetooth Adapter Class?

BluetoothAdapter class provides many constants. Some of them are as follows:

  1. String ACTION_REQUEST_DISCOVERABLE
  2. String ACTION_REQUEST_ENABLE
  3. String ACTION_DISCOVERY_STARTED
  4. String ACTION_DISCOVERY_FINISHED
  5. String ACTION_STATE_CHANGED

6.What are the Methods of Bluetooth Adapter Class?

BluetoothAdapter class provides many Methods. Some of them commonly used are as follows:
  1. boolean setName(String name):      changes the bluetooth name.
  2. boolean enable():      enables the bluetooth adapter if it is disabled.
  3. static synchronized BluetoothAdapter getDefaultAdapter():      returns the instance of BluetoothAdapter.
  4. boolean isEnabled():      returns true if the bluetooth adapter is enabled.
  5. boolean disable():      disables the bluetooth adapter if it is enabled.
  6. String getName():      returns the name of the bluetooth adapter.
  7. int getState():      returns the current state of the local bluetooth adapter.
  8. Set getBondedDevices():      returns a set of paired (bonded) BluetoothDevice objects.
  9. boolean startDiscovery():      starts the discovery process.
Categories: , ,