nfc

Reading a tag from a specific activity

好久不见. 提交于 2020-01-09 11:56:08
问题 I just finished my android app that have 1 activity, wherein it displays the data on the nfc tag, my problem is that whenever I tap nfc tag, the app opens/launch even if it is not open or running in the background. How can I prevent this from happening? I want my app to react when it is open, thanks 回答1: If you don't want your activity to automatically start upon scanning a tag, simply don't register NFC related intent filters in your app's manifest. But what if... ... you did not register

Android app enable NFC only for one Activity

。_饼干妹妹 提交于 2020-01-08 18:01:14
问题 Is it possible to enable NFC for only one activity in android for an NFC enabled application? I've read this, Reading NFC tags only from a particuar activity But the devices are still scanning for tags on all activities of the application. EDIT: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.nfccheckout" > <uses-feature android:name="android.hardware.nfc" android:required="true" /> <uses-permission android:name=

Comparing Data Read from NFC Tag

╄→尐↘猪︶ㄣ 提交于 2020-01-07 08:21:25
问题 Hi I am reading data from a NFC Tag and trying to compare it with a String but the if loop is getting failed while comparison of string.My code for reading NFC data and comparing it with String is as. Thank You. Parcelable[] messages = intent.getParcelableArrayExtra(NfcAdapter.EXTRA_NDEF_MESSAGES); //NdefMessage message = ndef.getNdefMessage(); if (messages != null) { NdefMessage[] ndefMessages = new NdefMessage[messages.length]; for (int i = 0; i < messages.length; i++) { ndefMessages[i] =

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:

Android NFC scan on method

和自甴很熟 提交于 2020-01-06 06:58:08
问题 I'm creating an app that will also use NFC to read specific tags. I have a parent activity class where I would like to put function like: public String scanTagId(){...} I'm able to get actually tagID from tag the problem is it only occurs onNewIntent so actually first it will finish scanTagId() function and then invoke onNewIntent actually. So the question is how to write scanTagId() to actually wait for reading Tag ID from NFC tag and return string with this tag ID. Maybe I need to approach

“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

MIFARE read-only & write protected block at the same time?

痞子三分冷 提交于 2020-01-06 03:58:04
问题 Which of MIFARE cards support a single block that can be programmed to require a password for writing, but is available to everyone for reading its data? And is such standard eligible on all platforms, specifically iOS. Can it use its NFC chip for doing both mentioned operations on such card? 回答1: There are quite a few products in the MIFARE product family 1 that would allow write-protecting information with an authentication key/password (while at the same time having that information freely

To get Application ID for NFC based Identification System

↘锁芯ラ 提交于 2020-01-05 04:00:22
问题 I am working on nfc based Identification System. I am storing data on android device and at the time of Identification The nfc reader reads the data from android device for this thing the android device should run in HOST based card emulation based on ISO/IEC 14443-3 and for the deployment the nfc reader send the Application ID to identify service as per Google Developer NFC documentation so how i get the application id for custom application 回答1: According to the documentation: "Specifically

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