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 {
    public static boolean setPairingConfirmation(Class<?> btClass, BluetoothDevice device, boolean isConfirm)
            throws Exception {
        Method setPairingConfirmation = btClass.getDeclaredMethod("setPairingConfirmation", boolean.class);
        return (boolean) setPairingConfirmation.invoke(device, isConfirm);
    }
}