Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.lang.reflect.Method;
import android.bluetooth.BluetoothDevice;

public class Main {
    public static boolean setPairingConfirmation(Class btClass, BluetoothDevice device, boolean confirm)
            throws Exception {
        Method setPairiConfirmMethod = btClass.getMethod("setPairingConfirmation", boolean.class);
        Boolean retVal = (Boolean) setPairiConfirmMethod.invoke(device, confirm);
        return retVal.booleanValue();
    }
}