Example usage for android.nfc NfcAdapter disableReaderMode

List of usage examples for android.nfc NfcAdapter disableReaderMode

Introduction

In this page you can find the example usage for android.nfc NfcAdapter disableReaderMode.

Prototype

public void disableReaderMode(Activity activity) 

Source Link

Document

Restore the NFC adapter to normal mode of operation: supporting peer-to-peer (Android Beam), card emulation, and polling for all supported tag technologies.

Usage

From source file:com.example.android.cardreader.CardReaderFragment.java

private void disableReaderMode() {
    Log.i(TAG, "Disabling reader mode");
    Activity activity = getActivity();//  www. j a v  a 2  s.com
    NfcAdapter nfc = NfcAdapter.getDefaultAdapter(activity);
    if (nfc != null) {
        nfc.disableReaderMode(activity);
    }
}

From source file:com.exponent.androidopacitydemo.MainActivity.java

private void disableNfcReaderMode() {
    logger.debug(TAG, "Disabling reader mode");
    NfcAdapter nfc = NfcAdapter.getDefaultAdapter(this);
    if (nfc != null) {
        nfc.disableReaderMode(this);
    }/*from  w  w  w.  j ava2 s .co  m*/
}

From source file:ykim81.cs.brown.ykim81.cardreader.CardReaderFragment.java

private void disableReaderMode() {
    Activity activity = getActivity();//from  www.  j a va 2 s. c  o  m
    NfcAdapter nfc = NfcAdapter.getDefaultAdapter(activity);
    if (nfc != null) {
        nfc.disableReaderMode(activity);
    }
}

From source file:com.example.android.cardreader.MainActivity.java

private void disableReaderMode() {
    Log.i(TAG, "Disabling reader mode");
    Activity activity = this;
    NfcAdapter nfc = NfcAdapter.getDefaultAdapter(activity);
    if (nfc != null) {
        nfc.disableReaderMode(activity);
    }//from  w ww  .  ja  va 2s. co  m
}