Android app nfc reader get intent, but it’s null
I m creating an android app in java using nfc technology to read a nfc tag. I ve wrote a simple text on it thank to another app downloaded from play store, but I cant manage to make my app read that simple text.
NFC Reader not working in my app in android studio [closed]
Closed 21 mins ago.
Lector NFC no funciona
LLevo unos días intentando hacer un lector y escritor de tags nfc en Android Studio, he preguntado en otro momento pero no veo la pregunta asi que repito con algunos cambios. He estado siguiendo un tutorial para este nuevo codigo, pero no lo consigo hacer funcionar, ni en Fragments de mi app ni en un MainActivity normal. Lo raro es que ni lee ni escribe en la tarjeta como debería, pero si me salgo de la app y leo el tagNFC al salirme el aviso de android de leer la etiqueta me abre mi app con el texto de la etiqueta nfc. me deberia mostrar ‘write(“PlainText|” + edit_message.getText().toString(), myTag);’ pero me muestra ‘ nfc_contents.setText ( “Contenido de la tarjeta NFC: ” + text);
‘ ahora os enseño todo el código. Además, me muestra este error en el logcat cada vez que leo una tarjeta nfc 2024-05-04 20:09:41.404 2573-2702 ActivityStarterImpl system_server E Error: Activity class {com.alfonso.nfcplay/com.alfonso.nfcplay.ui.read.ReadFragment} does not exist, como si estuviese buscando un paquete dentro del mismo paquete.
Pero bueno, el código:
”’
Android Nfc ISOdep transceive
In our device, we are using native android NFC library for processing bytes and taking new bytes. But when our bytes array size bigger then an specified size, the transceive function returns always same, faulty answer. it is -> [-111, 126, 103, 0], and when we convert to string, its transform to 91CD (or similar). I get the Isodep getMaxTransceiveLength result and its returning 65245. and Isodep .isExtendedLengthApduSupported returns true. But despite this, I split the byte[] into 12 blocks of 12 and processed them. yet is is returning wrong data. “917E6700”, we are waiting response as “4001020013011803192A13011803192A24BE05151DD5002202006542696C65743060CA2E9100”.
The string we are tring to process is -> 90AF0000109C6DBC92988860AEBA96D5059A5642EF00.