Java Code Examples for android.nfc.NfcAdapter#disableReaderMode()

The following examples show how to use android.nfc.NfcAdapter#disableReaderMode() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MainActivity.java    From LecteurOPUS with GNU General Public License v3.0 5 votes vote down vote up
private void disableReaderMode() {
    Log.i(TAG, "Disabling reader mode");
    Activity activity = this;
    NfcAdapter nfc = NfcAdapter.getDefaultAdapter(activity);
    if (nfc != null) {
        nfc.disableReaderMode(activity);
    }
}
 
Example 2
Source File: CardReaderFragment.java    From android-CardReader with Apache License 2.0 5 votes vote down vote up
private void disableReaderMode() {
    Log.i(TAG, "Disabling reader mode");
    Activity activity = getActivity();
    NfcAdapter nfc = NfcAdapter.getDefaultAdapter(activity);
    if (nfc != null) {
        nfc.disableReaderMode(activity);
    }
}
 
Example 3
Source File: NfcDeviceFragment.java    From ESeal with Apache License 2.0 4 votes vote down vote up
private void disableNfcReaderMode() {
    NfcAdapter nfcAdapter = NfcAdapter.getDefaultAdapter(getActivity());
    if (nfcAdapter != null) {
        nfcAdapter.disableReaderMode(getActivity());
    }
}
 
Example 4
Source File: DeviceOperationActivity.java    From ESeal with Apache License 2.0 4 votes vote down vote up
private void disableNfcReaderMode() {
    NfcAdapter nfcAdapter = NfcAdapter.getDefaultAdapter(this);
    if (nfcAdapter != null) {
        nfcAdapter.disableReaderMode(this);
    }
}
 
Example 5
Source File: DeviceSettingActivity.java    From ESeal with Apache License 2.0 4 votes vote down vote up
private void disableNfcReaderMode() {
    NfcAdapter nfcAdapter = NfcAdapter.getDefaultAdapter(this);
    if (nfcAdapter != null) {
        nfcAdapter.disableReaderMode(this);
    }
}
 
Example 6
Source File: TagDispatcher.java    From GreenBits with GNU General Public License v3.0 4 votes vote down vote up
private void disableReaderMode(NfcAdapter adapter) {
    adapter.disableReaderMode(activity);
}
 
Example 7
Source File: TagDispatcher.java    From nordpol with MIT License 4 votes vote down vote up
@TargetApi(Build.VERSION_CODES.KITKAT)
private void disableReaderMode(NfcAdapter adapter) {
    adapter.disableReaderMode(activity);
}
 
Example 8
Source File: TagDispatcher.java    From WalletCordova with GNU Lesser General Public License v2.1 4 votes vote down vote up
private void disableReaderMode(NfcAdapter adapter) {
    adapter.disableReaderMode(activity);
}