Java tutorial
//package com.java2s; import android.bluetooth.BluetoothDevice; public class Main { public static boolean cancelBondProcess(Class btClass, BluetoothDevice device) throws Exception { return ((Boolean) btClass.getMethod("cancelBondProcess", new Class[0]).invoke(device, new Object[0])) .booleanValue(); } }