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 final Boolean createBond(BluetoothDevice device) {

        try {
            Method m1 = device.getClass().getMethod("createBond", new Class[] {});
            return (Boolean) m1.invoke(device);
        } catch (Exception e) {
            return null;
        }
    }
}