Freigeben über


NfcAdapter.EnableReaderMode Method

Definition

Limit the NFC controller to reader mode while this Activity is in the foreground.

[Android.Runtime.Register("enableReaderMode", "(Landroid/app/Activity;Landroid/nfc/NfcAdapter$ReaderCallback;ILandroid/os/Bundle;)V", "")]
public void EnableReaderMode (Android.App.Activity? activity, Android.Nfc.NfcAdapter.IReaderCallback? callback, Android.Nfc.NfcReaderFlags flags, Android.OS.Bundle? extras);
[<Android.Runtime.Register("enableReaderMode", "(Landroid/app/Activity;Landroid/nfc/NfcAdapter$ReaderCallback;ILandroid/os/Bundle;)V", "")>]
member this.EnableReaderMode : Android.App.Activity * Android.Nfc.NfcAdapter.IReaderCallback * Android.Nfc.NfcReaderFlags * Android.OS.Bundle -> unit

Parameters

activity
Activity

the Activity that requests the adapter to be in reader mode

callback
NfcAdapter.IReaderCallback

the callback to be called when a tag is discovered

flags
NfcReaderFlags

Flags indicating poll technologies and other optional parameters

extras
Bundle

Additional extras for configuring reader mode.

Attributes

Remarks

Java documentation for android.nfc.NfcAdapter.enableReaderMode(android.app.Activity, android.nfc.ReaderCallback, int, android.os.Bundle).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to