NFC service is dead - attempt to recover

I have an application that reads and writes data to an NFC tag (Type 2). Several times, reading the tag, I get the following error in LogCat.

03-13 12:26:12.946: E/NFC(18889): NFC service dead - attempting to recover
03-13 12:26:12.946: E/NFC(18889): android.os.DeadObjectException
03-13 12:26:12.946: E/NFC(18889):   at android.os.BinderProxy.transact(Native Method)
03-13 12:26:12.946: E/NFC(18889):   at android.nfc.INfcAdapter$Stub$Proxy.setForegroundDispatch(INfcAdapter.java:350)
03-13 12:26:12.946: E/NFC(18889):   at android.nfc.NfcAdapter.disableForegroundDispatchInternal(NfcAdapter.java:1062)
03-13 12:26:12.946: E/NFC(18889):   at android.nfc.NfcAdapter.disableForegroundDispatch(NfcAdapter.java:1050)

Are there any ideas why this is happening. Is there any way to fix this.

Thank.

+4
source share
1 answer

I ran into the same problem and was able to solve it. This happens when you try to invoke an NFC bundle when activity is not in a state of renewal .

NFCBeamShareData , . , NullPointerException DeadObjectException.

+2

Source: https://habr.com/ru/post/1531506/


All Articles