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

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
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

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 bottom-left when the device is unfolded and the screens are facing the user. For non-foldable devices 0, 0 is bottom-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 android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

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