Formatting a Mifare Ultralight C to NDEF

只谈情不闲聊 提交于 2020-01-17 04:26:06
问题 I want to format a Mifare Ultralight C to handle NDEF messages. I have written the code below and it works just fine with the Mifare Classic 1K chips but it gets an IOExeption when i try and connect to the Ultralight C chip. NdefFormatable format = NdefFormatable.get(tag) if(format != null){ try { format.connect(); format.format(new NdefMessage(new NdefRecord(NdefRecord.TNF_EMPTY, null, null, null))); format.close(); Toast.makeText(getApplicationContext(), "Tag formated.", Toast.LENGTH_LONG)

Nfc and Intent-filter

感情迁移 提交于 2020-01-17 03:59:47
问题 I wrote a nfc text tag like this myscheme://company?page=2&poiId=140 Then i've created an Intent-filter like this in my manifest file in order to open my app (and then call a WS with informations from tag) <intent-filter> <action android:name="android.nfc.action.NDEF_DISCOVERED"/> <category android:name="android.intent.category.DEFAULT"/> <data android:mimeType="text/plain" android:scheme="myscheme" android:host="company"/> </intent-filter> If i remove scheme and host params from data tag so

Android: Receiving and processing NDEF records

家住魔仙堡 提交于 2020-01-06 08:30:52
问题 What I've been trying to do is send an integer and receive it and then take that integer and set it to the timer that's counting down. So far I am able to send the integer and have the application open on the other device, However when the device loads the activity, it opens the MainActivity and not the Newgame activity. I must admit at this point I'm not code smart and a bit of a novice but here is the extract of code which deals with NFC Communication, This extract is from the Newgame.java:

“Symmetry Procedure” in NFC P2P LLCP

拥有回忆 提交于 2020-01-06 04:28:32
问题 I'm about to implement the LLCP / SNEP protocol based on a PN532 NFC chip from NXP (purely for learning reasons) and i'm currently studying the LLCP specification of the NFC Forum. I'm pretty familiar with the MAC-layer of NFC as specified in ISO 18092, but i have some problems understanding how the "asynchronous balanced mode (ABM)" of LLCP works. To my understanding, the ABM enables the Initiator and the Target a possibility to send data at any time (on top of the actual master / slave

Cross platform launch records with extra data on Windows Phone and Android

為{幸葍}努か 提交于 2020-01-05 03:09:29
问题 Is it possible to create a cross platform NDEF Message to start an application on Android and Windows Phone passing additional data to the app? What I am trying to do: I have an application installed on Android and Windows Phone. It should be possible to start the applications with an NFC tag and I need to pass additional data from the tag (any string) to my applications. To start the applications with the NFC tags, I created a Windows Phone LaunchApp Record and an Android Application Record

Why I can't read ST M24LR64 as NDEF messages with Android NFC

北城以北 提交于 2020-01-05 02:56:29
问题 M24LR64 IC from STMicroelectronics supports ISO 15693 protocol, also called NfcV in Android NFC. When I placed my Nexus S phone (Android 4.0.4) near to my prototype tag board, I could hear a beep, and saw a message fired by the logcat: no tag fallback activity found for Intent { act = android.nfc.action.TAG_DISCOVERED} I wondered why the android dispatched the ACTION_TAG_DISCOVERED intent, not the ACTION_NDEF_DISCOVERED, because I had constructured the ndef format messages following the ST

Android 4.4.2, PN532 NFC reader and NFC Card emulation

吃可爱长大的小学妹 提交于 2020-01-01 19:22:12
问题 I have developed a system that can read NFC tag using a reader with PN532 chip. It works ok. I can read Mifare Classic and Mifare Ultralight tag. Now I'd like to use a Nexus Tablet with Android 4.4.2 to emulate a tag. I have no experience with android development but I think it is possible. I have set NFC communication in the Nexus Tablet but I think I have to download or write some application to emulate a Tag and an NDEF communication. What is the easiest way? 回答1: That depends on what

My cordova application not launching after NFC tag detect

一世执手 提交于 2019-12-31 03:15:15
问题 I am using Apache cordova to build android applications. I made an application with NFC feature. we already written data into NFC tag, with mimetype: myApp/firstNFCApp . Inside my application whenever detect tag with this mimetype my application will read data and showing that data into user friendly manner. This way I implemented, it's working fine.This was the code I written to fetch data from tag nfc.addNdefListener( function(nfcEvent){ console.log(nfc.bytesToString(nfcEvent.tag

How to read detected NFC tag (NDEF content) details in android?

感情迁移 提交于 2019-12-29 06:29:50
问题 I want to read NDEF content contained within a detected NFC tag (i.e., Tag id, Tag Size, Tag Type, Is tag Writable, Target Type, and message types). 回答1: I assume that you are talking about tags with NDEF content? In that case, you can do: Tag myTag = (Tag) nfcintent.getParcelableExtra(NfcAdapter.EXTRA_TAG); // get NDEF tag details Ndef ndefTag = Ndef.get(myTag); int size = ndefTag.getMaxSize(); // tag size boolean writable = ndefTag.isWritable(); // is tag writable? String type = ndefTag

Getting NDEF message from tag freezes Android app

情到浓时终转凉″ 提交于 2019-12-24 20:48:19
问题 I'm trying to read an NDEF message from an NFC tag. The detection of the tag works correctly. For reading the NDEF data from the tag I'm running a TimerTask. The task polls the NDEF message from the tag with getNdefMessage() every 900 ms and updates the UI. The procedure works perfect until I remove the phone. Than the app freezes without a logcat error message. Does anyone have an idea why this happens? package com.example.infcdemo; import java.io.IOException; import java.util.Timer; import