Added in API level 34

NfcAntennaInfo


class NfcAntennaInfo : Parcelable
kotlin.Any
   ↳ android.nfc.NfcAntennaInfo

Contains information on all available Nfc antennas on an Android device as well as information on the device itself in relation positioning of the antennas.

Summary

Inherited constants
Public constructors
NfcAntennaInfo(deviceWidth: Int, deviceHeight: Int, deviceFoldable: Boolean, availableNfcAntennas: MutableList<AvailableNfcAntenna!>)

Public methods
Int

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

MutableList<AvailableNfcAntenna!>

Get all NFC antennas that exist on the device.

Int

Height of the device in millimeters.

Int

Width of the device in millimeters.

Boolean

Whether the device is foldable.

Unit
writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<NfcAntennaInfo!>

Public constructors

NfcAntennaInfo

Added in API level 34
NfcAntennaInfo(
    deviceWidth: Int,
    deviceHeight: Int,
    deviceFoldable: Boolean,
    availableNfcAntennas: MutableList<AvailableNfcAntenna!>)
Parameters
availableNfcAntennas MutableList<AvailableNfcAntenna!>: This value cannot be null.

Public methods

describeContents

Added in API level 34
fun describeContents(): Int

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(android.os.Parcel,int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.

Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance.
Value is either 0 or

getAvailableNfcAntennas

Added in API level 34
fun getAvailableNfcAntennas(): MutableList<AvailableNfcAntenna!>

Get all NFC antennas that exist on the device.

Return
MutableList<AvailableNfcAntenna!> This value cannot be null.

getDeviceHeight

Added in API level 34
fun getDeviceHeight(): Int

Height of the device in millimeters.

getDeviceWidth

Added in API level 34
fun getDeviceWidth(): Int

Width of the device in millimeters.

isDeviceFoldable

Added in API level 34
fun isDeviceFoldable(): Boolean

Whether the device is foldable. When the device is foldable, the 0, 0 is considered to be top-left when the device is unfolded and the screens are facing the user. For non-foldable devices 0, 0 is top-left when the user is facing the screen.

writeToParcel

Added in API level 34
fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit

Flatten this object in to a Parcel.

Parameters
dest Parcel: This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE.
Value is either 0 or a combination of the following:

Properties

CREATOR

Added in API level 34
static val CREATOR: Parcelable.Creator<NfcAntennaInfo!>