Posts

Showing posts with the label bluetooth example

Bluetooth Example

Image
Using BluetoothAdapter class we will do the following operations Check if Bluetooth is available or not. Turn On/Off Bluetooth. Make Bluetooth Discoverable. Display Paired/Bounded devices. Note: The getBoundedDevices() method of BluetoothAdapter class provides a set containing list of all paired or bounded bluetooth devices. Permissions Required: BLUETOOTH, BLUETOOTH_ADMIN Step 1:  Create a new project   OR   Open your project Step 2:  Add 2 Images to show Bluetooth status icons Step 3:  Add  BLUETOOTH, BLUETOOTH_ADMIN  permission in AndroidMenifest.xml Step 4: Code AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android= "http://schemas.android.com/apk/res/android" package= "com.blogspot.atifsoftwares.bluetoothexample" > <uses-permission android:name= "android.permission.BLUETOOTH" /> <uses-permission android:na...