Code example for Binder

0
    public static final String EXTRA_MIFARE_BLOCK =
        "com.android.nfc_extras.extra.MIFARE_BLOCK"; 
 
    NfcExecutionEnvironment(NfcAdapterExtras extras) {
        mExtras = extras;
        mToken = new Binder();
    } 
 
    /** 
     * Open the NFC Execution Environment on its contact interface. 
     * 
     * <p>Opening a channel to the the secure element may fail 
     * for a number of reasons: 
     * <ul> 
     * <li>NFC must be enabled for the connection to the SE to be opened. 
     * If it is disabled at the time of this call, an {@link EeNfcDisabledException} 
     * is thrown. 
     * 
     * <li>Only one process may open the secure element at a time. Additionally, 
     * this method is not reentrant. If the secure element is already opened, 
     * either by this process or by a different process, an {@link EeAlreadyOpenException}