if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP_MR1) {
// Do this for phones running an SDK before lollipop
_hostBluetoothAddress = bluetoothAdapter.getAddress();
} else {
_hostBluetoothAddress = Settings.Secure.getString(getContentResolver(), "bluetooth_address");
}
Using this Code (used in the socket sample EZPairActivity) _hostBluetoothAddress is always returned as null in Android 8.1 (27). I tried using the ANDROID_ID instead but that doesn't seem to work either. Not able to pair a CHS 8Ci to my Pixel XL.