import typing

import android.app
import android.content
import android.net
import android.os
import java
import java.chaquopy
import java.io
import java.lang
import java.util

class AvailableNfcAntenna(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[AvailableNfcAntenna]] = ...
    def __init__(self, locationX: int | java.jint | java.lang.Integer, locationY: int | java.jint | java.lang.Integer, /) -> None: ...
    def describeContents(self) -> int: ...
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getLocationX(self) -> int: ...
    def getLocationY(self) -> int: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class FormatException(java.lang.Exception):
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def __init__(self, message: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, message: str | java.lang.String, e: java.lang.Throwable, /) -> None: ...

class NdefMessage(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[NdefMessage]] = ...
    @typing.overload
    def __init__(self, data: java.chaquopy.JavaArrayJByte, /) -> None: ...
    @typing.overload
    def __init__(self, records: java.chaquopy.JavaArray[NdefRecord], /) -> None: ...
    @typing.overload
    def __init__(self, record: NdefRecord, /, *records: NdefRecord) -> None: ...
    def describeContents(self) -> int: ...
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getByteArrayLength(self) -> int: ...
    def getRecords(self) -> java.chaquopy.JavaArray[NdefRecord]: ...
    def hashCode(self) -> int: ...
    def toByteArray(self) -> java.chaquopy.JavaArrayJByte: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class NdefRecord(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[NdefRecord]] = ...
    RTD_ALTERNATIVE_CARRIER: typing.ClassVar[java.chaquopy.JavaArrayJByte] = ...
    RTD_HANDOVER_CARRIER: typing.ClassVar[java.chaquopy.JavaArrayJByte] = ...
    RTD_HANDOVER_REQUEST: typing.ClassVar[java.chaquopy.JavaArrayJByte] = ...
    RTD_HANDOVER_SELECT: typing.ClassVar[java.chaquopy.JavaArrayJByte] = ...
    RTD_SMART_POSTER: typing.ClassVar[java.chaquopy.JavaArrayJByte] = ...
    RTD_TEXT: typing.ClassVar[java.chaquopy.JavaArrayJByte] = ...
    RTD_URI: typing.ClassVar[java.chaquopy.JavaArrayJByte] = ...
    TNF_ABSOLUTE_URI: typing.ClassVar[int] = ...
    TNF_EMPTY: typing.ClassVar[int] = ...
    TNF_EXTERNAL_TYPE: typing.ClassVar[int] = ...
    TNF_MIME_MEDIA: typing.ClassVar[int] = ...
    TNF_UNCHANGED: typing.ClassVar[int] = ...
    TNF_UNKNOWN: typing.ClassVar[int] = ...
    TNF_WELL_KNOWN: typing.ClassVar[int] = ...
    @typing.overload
    def __init__(self, data: java.chaquopy.JavaArrayJByte, /) -> None: ...
    @typing.overload
    def __init__(self, tnf: int | java.jshort | java.lang.Short, type: java.chaquopy.JavaArrayJByte, id: java.chaquopy.JavaArrayJByte, payload: java.chaquopy.JavaArrayJByte, /) -> None: ...
    @staticmethod
    def createApplicationRecord(packageName: str | java.lang.String, /) -> NdefRecord: ...
    @staticmethod
    def createExternal(domain: str | java.lang.String, type: str | java.lang.String, data: java.chaquopy.JavaArrayJByte, /) -> NdefRecord: ...
    @staticmethod
    def createMime(mimeType: str | java.lang.String, mimeData: java.chaquopy.JavaArrayJByte, /) -> NdefRecord: ...
    @staticmethod
    def createTextRecord(languageCode: str | java.lang.String, text: str | java.lang.String, /) -> NdefRecord: ...
    @typing.overload
    @staticmethod
    def createUri(uri: android.net.Uri, /) -> NdefRecord: ...
    @typing.overload
    @staticmethod
    def createUri(uriString: str | java.lang.String, /) -> NdefRecord: ...
    def describeContents(self) -> int: ...
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getId(self) -> java.chaquopy.JavaArrayJByte: ...
    def getPayload(self) -> java.chaquopy.JavaArrayJByte: ...
    def getTnf(self) -> int: ...
    def getType(self) -> java.chaquopy.JavaArrayJByte: ...
    def hashCode(self) -> int: ...
    def toByteArray(self) -> java.chaquopy.JavaArrayJByte: ...
    def toMimeType(self) -> str | None: ...
    def toString(self) -> str: ...
    def toUri(self) -> android.net.Uri | None: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class NfcAdapter(java.lang.Object):
    ACTION_ADAPTER_STATE_CHANGED: typing.ClassVar[str] = ...
    ACTION_CHANGE_TAG_INTENT_PREFERENCE: typing.ClassVar[str] = ...
    ACTION_NDEF_DISCOVERED: typing.ClassVar[str] = ...
    ACTION_PREFERRED_PAYMENT_CHANGED: typing.ClassVar[str] = ...
    ACTION_TAG_DISCOVERED: typing.ClassVar[str] = ...
    ACTION_TECH_DISCOVERED: typing.ClassVar[str] = ...
    ACTION_TRANSACTION_DETECTED: typing.ClassVar[str] = ...
    EXTRA_ADAPTER_STATE: typing.ClassVar[str] = ...
    EXTRA_AID: typing.ClassVar[str] = ...
    EXTRA_DATA: typing.ClassVar[str] = ...
    EXTRA_ID: typing.ClassVar[str] = ...
    EXTRA_NDEF_MESSAGES: typing.ClassVar[str] = ...
    EXTRA_PREFERRED_PAYMENT_CHANGED_REASON: typing.ClassVar[str] = ...
    EXTRA_READER_PRESENCE_CHECK_DELAY: typing.ClassVar[str] = ...
    EXTRA_SECURE_ELEMENT_NAME: typing.ClassVar[str] = ...
    EXTRA_TAG: typing.ClassVar[str] = ...
    FLAG_LISTEN_DISABLE: typing.ClassVar[int] = ...
    FLAG_LISTEN_KEEP: typing.ClassVar[int] = ...
    FLAG_LISTEN_NFC_PASSIVE_A: typing.ClassVar[int] = ...
    FLAG_LISTEN_NFC_PASSIVE_B: typing.ClassVar[int] = ...
    FLAG_LISTEN_NFC_PASSIVE_F: typing.ClassVar[int] = ...
    FLAG_READER_DISABLE: typing.ClassVar[int] = ...
    FLAG_READER_KEEP: typing.ClassVar[int] = ...
    FLAG_READER_NFC_A: typing.ClassVar[int] = ...
    FLAG_READER_NFC_B: typing.ClassVar[int] = ...
    FLAG_READER_NFC_BARCODE: typing.ClassVar[int] = ...
    FLAG_READER_NFC_F: typing.ClassVar[int] = ...
    FLAG_READER_NFC_V: typing.ClassVar[int] = ...
    FLAG_READER_NO_PLATFORM_SOUNDS: typing.ClassVar[int] = ...
    FLAG_READER_SKIP_NDEF_CHECK: typing.ClassVar[int] = ...
    PREFERRED_PAYMENT_CHANGED: typing.ClassVar[int] = ...
    PREFERRED_PAYMENT_LOADED: typing.ClassVar[int] = ...
    PREFERRED_PAYMENT_UPDATED: typing.ClassVar[int] = ...
    STATE_OFF: typing.ClassVar[int] = ...
    STATE_ON: typing.ClassVar[int] = ...
    STATE_TURNING_OFF: typing.ClassVar[int] = ...
    STATE_TURNING_ON: typing.ClassVar[int] = ...
    def disable(self) -> bool: ...
    def disableForegroundDispatch(self, activity: android.app.Activity, /) -> None: ...
    def disableReaderMode(self, activity: android.app.Activity, /) -> None: ...
    def enable(self) -> bool: ...
    def enableForegroundDispatch(self, activity: android.app.Activity, intent: android.app.PendingIntent, filters: java.chaquopy.JavaArray[android.content.IntentFilter], techLists: java.chaquopy.JavaArray[java.chaquopy.JavaArray[java.lang.String]], /) -> None: ...
    def enableReaderMode(self, activity: android.app.Activity, callback: NfcAdapter.ReaderCallback, flags: int | java.jint | java.lang.Integer, extras: android.os.Bundle, /) -> None: ...
    @staticmethod
    def getDefaultAdapter(context: android.content.Context, /) -> NfcAdapter | None: ...
    def getNfcAntennaInfo(self) -> NfcAntennaInfo | None: ...
    def ignore(self, tag: Tag, debounceMs: int | java.jint | java.lang.Integer, tagRemovedListener: NfcAdapter.OnTagRemovedListener, handler: android.os.Handler, /) -> bool: ...
    def isEnabled(self) -> bool: ...
    def isObserveModeEnabled(self) -> bool: ...
    def isObserveModeSupported(self) -> bool: ...
    def isReaderOptionEnabled(self) -> bool: ...
    def isReaderOptionSupported(self) -> bool: ...
    def isSecureNfcEnabled(self) -> bool: ...
    def isSecureNfcSupported(self) -> bool: ...
    def isTagIntentAllowed(self) -> bool: ...
    def isTagIntentAppPreferenceSupported(self) -> bool: ...
    def resetDiscoveryTechnology(self, activity: android.app.Activity, /) -> None: ...
    def setDiscoveryTechnology(self, activity: android.app.Activity, pollTechnology: int | java.jint | java.lang.Integer, listenTechnology: int | java.jint | java.lang.Integer, /) -> None: ...
    def setObserveModeEnabled(self, enabled: bool | java.jboolean | java.lang.Boolean, /) -> bool: ...

    class ReaderCallback(java.lang.Object):
        def onTagDiscovered(self, arg1: Tag, /) -> None: ...

    class OnTagRemovedListener(java.lang.Object):
        def onTagRemoved(self) -> None: ...

    class OnNdefPushCompleteCallback(java.lang.Object):
        def onNdefPushComplete(self, arg1: NfcEvent, /) -> None: ...

    class CreateNdefMessageCallback(java.lang.Object):
        def createNdefMessage(self, arg1: NfcEvent, /) -> NdefMessage: ...

    class CreateBeamUrisCallback(java.lang.Object):
        def createBeamUris(self, arg1: NfcEvent, /) -> java.chaquopy.JavaArray[android.net.Uri]: ...

class NfcAntennaInfo(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[NfcAntennaInfo]] = ...
    def __init__(self, deviceWidth: int | java.jint | java.lang.Integer, deviceHeight: int | java.jint | java.lang.Integer, deviceFoldable: bool | java.jboolean | java.lang.Boolean, availableNfcAntennas: java.util.List[AvailableNfcAntenna], /) -> None: ...
    def describeContents(self) -> int: ...
    def getAvailableNfcAntennas(self) -> java.util.List[AvailableNfcAntenna]: ...
    def getDeviceHeight(self) -> int: ...
    def getDeviceWidth(self) -> int: ...
    def isDeviceFoldable(self) -> bool: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class NfcEvent(java.lang.Object):
    nfcAdapter: NfcAdapter = ...
    peerLlcpMajorVersion: int = ...
    peerLlcpMinorVersion: int = ...

class NfcManager(java.lang.Object):
    def getDefaultAdapter(self) -> NfcAdapter: ...

class Tag(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[Tag]] = ...
    def describeContents(self) -> int: ...
    def getId(self) -> java.chaquopy.JavaArrayJByte: ...
    def getTechList(self) -> java.chaquopy.JavaArray[java.lang.String]: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class TagLostException(java.io.IOException):
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def __init__(self, message: str | java.lang.String, /) -> None: ...
