Code example for BluetoothAdapter

Methods: getAddress

0
        //Bluetooth Address 
        mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
         
        // Device supports Bluetooth. if returns null means device DOES NOT SUPPORT bluetooth. 
        if (mBluetoothAdapter != null) {
        	bt_address = mBluetoothAdapter.getAddress();
        	if(bt_address == null) {
        		bt_address = "Unavailable";
        	} 
        } else 
        { 
        	bt_address = "Bluetooth Address not found or device not supported.";
        } 
         
      //---------------------------------------------- SERIAL NUMBER ----------------------------------------------------------// 
        //Get Device Serial Number 
        serial = null; 
 
        try { 
            Class<?> c = Class.forName("android.os.SystemProperties");
            Method get = c.getMethod("get", String.class);