cancel Bluetooth Pairing User Input - Android Bluetooth

Android examples for Bluetooth:Bluetooth Bond

Description

cancel Bluetooth Pairing User Input

Demo Code


//package com.java2s;

import java.lang.reflect.Method;

import android.bluetooth.BluetoothDevice;

public class Main {
    static public boolean cancelPairingUserInput(Class btClass,
            BluetoothDevice device) throws Exception {
        Method createBondMethod = btClass
                .getMethod("cancelPairingUserInput");
        // cancelBondProcess()

        Boolean returnValue = (Boolean) createBondMethod.invoke(device);
        return returnValue.booleanValue();
    }/*from  w w  w . j a  v a 2  s  . c om*/
}

Related Tutorials