Unregister the activity from NFC events - Android Network

Android examples for Network:NFC

Description

Unregister the activity from NFC events

Demo Code


//package com.java2s;
import android.app.Activity;

import android.nfc.NfcAdapter;

public class Main {
    /**/*from   www . j a v a2  s .  c  o  m*/
     * Unregister the activity from NFC events
     * @param activity the activity to be unregistered
     * @param adapter the local (phone's) NfcAdapter
     */
    public static void disableForegroundDispatch(Activity activity,
            NfcAdapter adapter) {
        adapter.disableForegroundDispatch(activity);
    }
}

Related Tutorials