Java tutorial
//package com.java2s; import android.bluetooth.BluetoothDevice; import java.lang.reflect.*; public class Main { static public boolean cancelPairingUserInput(Class btClass, BluetoothDevice device) throws Exception { Method createBondMethod = btClass.getMethod("cancelPairingUserInput"); // cancelBondProcess() Boolean returnValue = (Boolean) createBondMethod.invoke(device); return returnValue.booleanValue(); } }