remove bond between two bluetooth device - Android Bluetooth

Android examples for Bluetooth:Bluetooth Bond

Description

remove bond between two bluetooth device

Demo Code


//package com.java2s;

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  w w w  . j  av  a2s.c o m
}

Related Tutorials