ndef

Two NFC tags linking to two different activities each in a project?

僤鯓⒐⒋嵵緔 提交于 2019-12-01 12:30:16
I'm doing an NFC Application and was wondering if this scenario is possible: Say, I have 2 NFC tags and 2 activities in one project. NFC A is written to open up Activity A by writing MIME type in NFC A as application/com.example.hello In the project's manifest file, Activity A has this intent filter: <intent-filter> <action android:name="android.nfc.action.NDEF_DISCOVERED" /> <data android:mimeType="application/com.example.hello" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> So, this works perfectly fine. I'm going to add another NFC Tag, and another activity.

Read NDEF message with external NFC reader ACR1252

岁酱吖の 提交于 2019-12-01 11:29:20
问题 I am using the following command to read a binary block from a Mifare Ultralight tag: FF B0 00 01 04 But now I want to exact the NDEF message stored in that Mifare Ultralight tag using an ACR1252 NFC reader. Which command do I have to use to get the full NDEF message? On which position in the tag is the NDEF message stored? 回答1: MIFARE Ultralight tags map to the NFC Forum Type 2 Tag Operation specification (broken link, here is an alternative. Consequently, in order to extract the NDEF

Two NFC tags linking to two different activities each in a project?

…衆ロ難τιáo~ 提交于 2019-12-01 11:02:46
问题 I'm doing an NFC Application and was wondering if this scenario is possible: Say, I have 2 NFC tags and 2 activities in one project. NFC A is written to open up Activity A by writing MIME type in NFC A as application/com.example.hello In the project's manifest file, Activity A has this intent filter: <intent-filter> <action android:name="android.nfc.action.NDEF_DISCOVERED" /> <data android:mimeType="application/com.example.hello" /> <category android:name="android.intent.category.DEFAULT" />

NFC. Start a activity when scanning NDEF message

旧巷老猫 提交于 2019-12-01 01:12:33
I'm trying to start a activity when my smartphone scans an NDEF message. This is my manifest: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.androidbeam" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="17" /> <uses-permission android:name="android.permission.NFC" /> <uses-feature android:name="android.hardware.nfc" /> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style

Write NDEF message multiple times to same tag?

断了今生、忘了曾经 提交于 2019-11-30 23:34:35
On Android, as soon as an NFC tag gets in proximity of the phone, the system delievers an intent to my application that contains an objects that allows me to read and write the NDEF message of this tag. Specifically, I can write to this tag as often as I want, while it's still in proxmity of the phone. The Java code below gives you an impression of what i mean: Tag tag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG); Ndef ndef = Ndef.get(tag); ndef.writeNdefMessage(/* some NDEF data */); // first write ndef.writeNdefMessage(/* some NDEF data */); // second write // further writes ndef

NFC. Start a activity when scanning NDEF message

情到浓时终转凉″ 提交于 2019-11-30 20:54:16
问题 I'm trying to start a activity when my smartphone scans an NDEF message. This is my manifest: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.androidbeam" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="17" /> <uses-permission android:name="android.permission.NFC" /> <uses-feature android:name="android.hardware.nfc" /> <application android

2 NDEF messages/records on one NFC tag - Android

左心房为你撑大大i 提交于 2019-11-30 18:55:40
问题 Does anybody tried how the Android default behavior, when on the NFC tag are saved 2 NDEF records, one is pointing to the URL with application .apk, while the 2nd has application proprietary data? The use case is following: When user has not an application installed yet the device starts either Google Play or the web browser and user can download the application. Once user installs the application it process the tag content. Both are working separately, but I have not tried 2 NDEF messages or

Creating an NDEF WiFi record using application/vnd.wfa.wsc in Android

こ雲淡風輕ζ 提交于 2019-11-30 17:39:27
As of Android 5.0.0 you can long tap on a WiFi connection and write that connection to a tag ("Write to NFC tag"). You can find the source for that operation here: WriteWifiConfigToNfcDialog.java . The relevant line that takes a WiFi connection and creates an NDEF payload appears to be here: String wpsNfcConfigurationToken = mWifiManager.getWpsNfcConfigurationToken(mAccessPoint.networkId); mWifiManager is an instance of WifiManager , however getWpsNfcConfigurationToken is not part of the API. By tracking down this method, we can find its commit here: Add calls for NFC WSC token creation which

Two actions on one NFC tag

冷暖自知 提交于 2019-11-30 09:08:02
问题 I want to know if it is possible to do the following; I want to have a nfc tag that works in conjunction with an Android application that I am developing. If i swipe the tag and my application is installed on the phone I want to read of plain text data from the tag. Nothing fancy just a number up to 999. But if my application is not installed I want the tag to open up the web browser and redirect to a link where they can download this? Is this possible with the way android have gone about

Picture on NFC tags

旧城冷巷雨未停 提交于 2019-11-30 08:52:58
问题 With the latest NFC tags, it is possible to store up to 8k of data. So I would like to know how to store a picture on a tag, like the NXP TagWriter app. I found no information about it. Can anyone explain how to do that? 回答1: You can use MIME type records to store images on NFC tags. If, for instance, your image is a JPEG image, you would use the MIME type "image/jpeg". You NDEF record could then look like this: +----------------------------------------+ + MB=1, ME=1, CF=0, SR=0, IL=0, TNF