Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Creating an instance of the paired OBDII device
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
private static String OBD2_DEVICE_NAME = "OBDII"; // Name of the Device shipped by the manufacturer
BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
Set<BluetoothDevice> bondedDevices = mBluetoothAdapter.getBondedDevices();
BluetoothDevice obd2Device;
for(BluetoothDevice bondedDevice: bondedDevices) {
if (bondedDevice.getName().contains(OBD2_DEVICE_NAME)) {
obd2Device = bondedDevice;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.