Glenn Arens February 2016

SetPin return false on android but no exception

When I try to use SetPin on a bluetooth device it returns false. but according to if it returns false it should display an error. Any ideas? my code is down here.

   pin = (byte[]) BluetoothDevice.class.getMethod("convertPinToBytes", String.class).invoke(BluetoothDevice.class, "4711");
            boolean check = CurrentDevice.setPin(pin);
            int test = CurrentDevice.getBondState();


spaceplane February 2016

According to[]):

public boolean setPin(byte<> pin) 

Returns: true pin has been set false for error

There is no mention of an exception and so if you are not getting one your code is behaving correctly.

Post Status

Asked in February 2016
Viewed 2,480 times
Voted 14
Answered 1 times


Leave an answer