remove Bluetooth Device Bond - Android android.bluetooth

Android examples for android.bluetooth:Bluetooth On Off

Description

remove Bluetooth Device Bond

Demo Code

import java.lang.reflect.Method;

import android.bluetooth.BluetoothDevice;

public class Main{


    static public boolean removeBond(Class<?> btClass,
            BluetoothDevice btDevice) throws Exception {
        Method removeBondMethod = btClass.getMethod("removeBond");
        Boolean returnValue = (Boolean) removeBondMethod.invoke(btDevice);
        return returnValue.booleanValue();
    }/*from ww  w. j a  v a 2s  . com*/

}

Related Tutorials