Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.bluetooth.BluetoothDevice;

import java.lang.reflect.Method;

public class Main {
    static public boolean setPinConfig(Class btClass, BluetoothDevice btDevice, boolean config) throws Exception {

        Method removeBondMethod = btClass.getDeclaredMethod("setPairingConfirmation",
                new Class[] { boolean.class });
        Boolean returnValue = (Boolean) removeBondMethod.invoke(btDevice, new Object[] { config });
        return true;
    }
}