Java tutorial
//package com.java2s; //License from project: Apache License import android.bluetooth.BluetoothDevice; import java.lang.reflect.Method; 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(); } }