bluetoothCHatのサンプルアプリについて学習していて、
自動ペアリングを行おうとしているのですが、
BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);

Method createBond = device.getClass().getMethod("createBond", new Class[] {});
boolean a = device.createBond(device.getAddress());
boolean b = device.setPin(device.getAddress(), BluetoothDevice.convertPinToBytes("0000"));

と記述すると、
createBond()引数がダメです。
という風にエラーがでてきます。
どう対処すればいいでしょうか。