ndef

Writing Ndef to NFC tag in Windows Form Application C# using ACR122U as Reader/Writer

ε祈祈猫儿з 提交于 2019-12-11 00:33:23
问题 I am trying to create and write an NDEF message to an NFC tag in a Windows Form Application (written in C#) using an ACR122U NFC reader. I have created raw bytes of the NDEF message using Andreas Jakl's NDEF library. This is the C# code: var spRecord = new NdefTextRecord { Text = "1", LanguageCode = "en" }; var msg = new NdefMessage { spRecord }; string hex = BitConverter.ToString(msg.ToByteArray()); resultBox.Text = hex.Replace('-',' '); The output I get is D1 01 04 54 02 65 6E 31

Activity is not launched by NFC Tag

邮差的信 提交于 2019-12-10 12:25:42
问题 I've declared required intent filters, in manifest file for Activity. Scenario #1: when I tested with NFCDemo android sample app -> broad cast nfc tag -> that time my app is prompted in chooser dialog like other nfc apps NFC Tag Info & NXP Tag Info. Scenario #2: After swiping real NFC Tag(card) -> NFC TagInfo, TagInfo apps are prompted in chooser dialog, but my app didn't. my requirement -> My app also should be displayed like NFC Tag info app. more info -> its an empty card!. <intent-filter>

Application launched by Action Main (from AAR) instead of NDEF Discovered

给你一囗甜甜゛ 提交于 2019-12-10 12:14:53
问题 I'm trying to launch my application by scanning a tag, but the intent I get is the action Main and not the NDEF Discovered as I would like. Here is my code I use to write the NdefMessage : NdefRecord aar = NdefRecord.createApplicationRecord("com.example.mynfc"); NdefRecord record = createUriRecord("www.stackoverflow.com"); NdefMessage message = new NdefMessage(new NdefRecord[]{record, aar}); with the createUriRecord : private NdefRecord createUriRecord(String text){ String uniqueId = text

Accessing card-emulation mode on USB-NFC-Reader

寵の児 提交于 2019-12-10 08:22:58
问题 I have an Android tablet with Android 4.2. This tablet does not have NFC hardware. However I have an external USB reader: ACR 1252U, that came with an Android library. I have asked some general questions of my setup here. Now that it gets more specific, I need to ask another one. In this previous question I found out, that I can use the ACS Android library to access the readers card emulation capabilities. My first goal is to make that reader emulate an NFC tag, that contains a URL. Any 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);

NFC Tag is null when more than >1 NdefRecord

…衆ロ難τιáo~ 提交于 2019-12-08 13:50:54
问题 Im a newbie at NFC on Android, but have managed to have an app read & write to a NFC tag. Originally, I had one NdefRecord in a NdefMessage on the tag, basically some data. I was successful at retrieving the data from the tag whenever I scanned it. I then wanted to add an application record, so that if user's scan my tag and do not have my app, they are redirected to the PlayStore. When I introduced the application record to the tag, every time I scan the tag my activity starts/resumes by

How to solve tgInitAsTarget response problem with ACR122U-A9?

懵懂的女人 提交于 2019-12-08 13:18:41
I am working over emulating ndef tags with acr122U device(PN532 chip). My start point was the question at How to card emulate with ACR122U-A9 . I can manage device (I can change led or buzzer states) with direct commands. But could not get a response from device when I pass tgInitAsTarget command. There is no an error, I am getting empty response when I pass tgInitAsTarget. I am working over an windows 10 machine with Java, the acr122u firmware is ACR122U215 version. Here is my commands and responses: Read registers << FF 00 00 00 08 D4 06 63 05 63 0D 63 38 >> D5 07 07 00 05 90 00 Write

How to solve tgInitAsTarget response problem with ACR122U-A9?

穿精又带淫゛_ 提交于 2019-12-08 05:09:55
问题 I am working over emulating ndef tags with acr122U device(PN532 chip). My start point was the question at How to card emulate with ACR122U-A9. I can manage device (I can change led or buzzer states) with direct commands. But could not get a response from device when I pass tgInitAsTarget command. There is no an error, I am getting empty response when I pass tgInitAsTarget. I am working over an windows 10 machine with Java, the acr122u firmware is ACR122U215 version. Here is my commands and

Illegal character in NDEF URI payload

给你一囗甜甜゛ 提交于 2019-12-08 04:48:51
问题 I'm writing NFC based app that would scan a NFC tag with a Url. Once, the tag is scanned, the app should retrieve information from a database and display it in a ListView. The error occurs when I scan the NFC tag. Error in http connection java.lang.IllegalArgumentException: Illegal character in scheme at index 0: ??http://abc.com/~090123/get_items.php The logcat displays some weird ?? characters before http:// . I'm writing the Url in the tag using following code: private boolean writeTag(Tag

Testing an app by faking NFC tag scan

微笑、不失礼 提交于 2019-12-08 02:27:17
问题 I am new to Android, working on Near Field Communication for reading data from NFC tags. Neither I have NFC supported Android mobile nor NFC tags to test the application I created. I found the below two posts which says about faking NFC tag scans by triggering an Intent. Possibility for Fake NFC(Near Field Communication) Launch Need To Fake an NFC Tag Being Scanned In Android I changed my code according to the first post, where on click of a button I am triggering the required Intent in the