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