Android examples for Bluetooth:Bluetooth Device
get Bluetooth Device Id
//package com.java2s; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; public class Main { public static int getDeviceId(BluetoothDevice device) { return getDeviceId(device.getAddress()); }// w w w . j a v a 2s . c o m public static int getDeviceId(String address) { if (!BluetoothAdapter.checkBluetoothAddress(address)) { return 0; } final String longAddress = address.replaceAll(":", ""); return (int) (Long.parseLong(longAddress, 16)); } }