nfc

How to write NDEF message to any MIME type of NFC tag?

早过忘川 提交于 2019-12-09 23:41:24
问题 I have created this activity to create my own type of NFC tag public class WriteTag extends Activity { Tag tag; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.write_tag); } public void onResume() { super.onResume(); Intent intent = getIntent(); if (NfcAdapter.ACTION_NDEF_DISCOVERED.equals(intent.getAction())) { tag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG); try { write("my/type", "this is payload text", tag);

How can I protect a Mifare Classic Tag that contains a NDEF message?

a 夏天 提交于 2019-12-09 23:41:08
问题 It's easy to protect a Mifare Ultralight with Android, there is the Ndef.makeReadonly() method for that. But Mifare Classic tags return Ndef.canMakeReadonly() == false , so this is not possible. I heard that one can make such a tag readonly or at least protect it with a key by setting the a or b keys. There's this methid in MifareClassic tech: authenticateSectorWithKeyB(int sectorIndex, byte[] key) Does anyone know if this can be used to make a ndef message on a mifare classic tag read-only?

Reading the tag UID of Mifare classic card

断了今生、忘了曾经 提交于 2019-12-09 22:00:06
问题 I am creating an app for NFC where my first objective is to get the tag uid from the mifare tag. When i press the tag button my activvity goes to second activity where i should be getting the tagID. I am getting error of resource lookup. I know i am doing some major mistakes but could not find it. Request you to please help. This is my Meanifest file <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.chetan.nfc" android

Control full APDU with NFC Software Card Emulation on Android

自闭症网瘾萝莉.ら 提交于 2019-12-09 18:42:18
问题 I'm busy with an app to emulate normal APDU communication on a Nexus 7 with CM10.1 to an ACR122U102 reader/writer. I found this blog about software card emulation and wrote an app to make my device (the nexus) appear as a card. Now I'm trying to send messages back and forth between this device and the ACR122u. So far, I've only managed to communicate with the nexus 7 by sending D4 40 01 (InDataExchange page 127) APDU's. For the application I'm writing, this should be sufficient. The problem

“Missing required entitlement” for NFCTagReaderSession

痴心易碎 提交于 2019-12-09 16:55:47
问题 I'm diving into iOS 13's new CoreNFC capabilities, and I'm struggling to get NFCTagReaderSession working. After setting up my entitlements and instantiating an NFCTagReaderSession and delegate I attempt to start the session by calling nfcTagReaderSession?.begin() . My session immediately gets invalidated with this error: Error Domain=NFCError Code=2 "Missing required entitlement" UserInfo={NSLocalizedDescription=Missing required entitlement} I followed the documentation here for my

How to debug the NFC implementation of Android?

前提是你 提交于 2019-12-09 12:28:28
问题 This question can be decomposed into multiple smaller problems. The end result would be to be able to set a breakpoint in the C/C++ NFC implementation of a Galaxy Nexus (Android 4.1) device using a debugger such as gdb to examine it's internal state. Is it possible to replace the libraries on a Galaxy Nexus devices with ones that contain debugging symbols? Is it possible to use gdb to debug the C/C++ implementation of an Android device? Is it possible to cross-compile the NFC implementation

use Jelly Bean's Simple Secure Pairing ( Bluetooth ) to pair with NFC

孤街浪徒 提交于 2019-12-09 10:58:39
问题 As of #io2012 and JellyBean doc there is now a way to pair bluetooth devices via NFC. That sounds really nice, but I cannot find any documentation about it. I am especially interested to know if that works with SPP modules that do not support SDP - can I simply write some NFC tag with the PIN-Info and the device gets paired? Would help a lot as a lot of users, that have problems with the PIN-pairing process. 回答1: There are two kinds of Bluetooth pairing NDEF messages that are supported by

Are there any Android phones which support extended APDUs?

我只是一个虾纸丫 提交于 2019-12-09 06:28:34
问题 I am developing an Android app which has function to read data from a smart card. By default, NFC Controllers support APDU command with maximum transceive length is 261 bytes in single command. Because of large data need to be read on the card, the speed of reading is very slow. Are there any Android phones which support extended APDUs allow to send more than 261 bytes in single APDU ? Or are there any ways to modify the maximum transceive length by calling Android API to allow to do that? I

Host-based Card Emulation, any guidance please?

两盒软妹~` 提交于 2019-12-09 03:25:47
问题 I'm new to this field, I got a Nexus S ( CyanogenMod11 = Android Kitkat 4.4.2) And I need to use HCE (Host-Based Card Emulation) mode in order to emulate a contactless card. Any guidance on the steps and the tips I need to follow in order to accomplish this? ( - Do I need to program the simulated Secure Element? put it on cloud? ) P.S: I have to use the new Reader Mode also, because my app is going to be read by another Android NfC-enabled phone and not by an NFC reader. Thank you. 回答1:

SIGSEGV error using SWIG to make a java shared library

匆匆过客 提交于 2019-12-09 01:09:16
问题 So, I'm trying to port a C library (libnfc) to Java using SWIG. I've got to the point of having a compiled shared library, and a basic "nfc_version()" method call will work. However, calling "nfc_init()" to set things up causes a SIGSEGV error. Calling the nfc library directly is fine. The commands I used to generate the shared library: swig -java -I../libnfc/include nfclib.i gcc -c -I/usr/lib/jvm/java-7-openjdk-i386/include/ -I/usr/lib/jvm/java-7-openjdk-i386/include/linux nfclib_wrap.c gcc