public void checkBluetoothSupport(){ // Initializes a Bluetooth adapter. For API level 18 and above, get a reference to // BluetoothAdapter through BluetoothManager. final BluetoothManager bluetoothManager = (BluetoothManager) context.getSystemService(Context.BLUETOOTH_SERVICE); BluetoothAdapter mBluetoothAdapter = bluetoothManager.getAdapter(); // Checks if Bluetooth is supported on the device. if (mBluetoothAdapter == null) { Toast.makeText(context, "Device does not supports BLE", Toast.LENGTH_SHORT).show(); return; } else{ Toast.makeText(context, "Device supports BLE", Toast.LENGTH_SHORT).show(); } }
Hello everyone, The purpose of this blog is to give you all kind of technical support in simple manner. Find latest technology support every time so as to keep you updated on daily basis. Exact source code snippet will help you understand more and integrate same in difficult situation. Note: Blog is maintained by Nikhil Lotke.
Wednesday, February 1, 2017
How to check Android device supports BLE (Bluetooth Low Energy)
Labels:
android
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment