cancel Pairing User Input - Android android.view.inputmethod

Android examples for android.view.inputmethod:InputMethodManager

Description

cancel Pairing User Input

Demo Code

import java.lang.reflect.Method;

import android.bluetooth.BluetoothDevice;
import android.util.Log;

public class Main{

    static public boolean cancelPairingUserInput(Class<?> btClass,
            BluetoothDevice device) {/*from  w  w w. j av a 2  s  .c  om*/
        try {
            Method createBondMethod = btClass
                    .getMethod("cancelPairingUserInput");
            // cancelBondProcess()
            Boolean returnValue = (Boolean) createBondMethod.invoke(device);
            Log.i("BluetoothUtil", "???????????" + returnValue);
            return returnValue.booleanValue();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return false;
    }

}

Related Tutorials