ndef

NFC and MIME TYPE case sensitive

爷,独闯天下 提交于 2019-12-23 13:26:18
问题 I'm attempting just the basic version of NFC, but then I discovered that MIME TYPE is case sensitive. The package name for my app has one capital letter. Package name: com.example.Main_Activity <intent-filter> <action android:name="android.nfc.action.NDEF_DISCOVERED"/> <category android:name="android.intent.category.DEFAULT"/> <data android:mimeType="application/com.example.Main_Activity"/> </intent-filter> Does anyone know a way around it? Thanks 回答1: MIME types are case-insensitive as per

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

試著忘記壹切 提交于 2019-12-21 07:08:13
问题 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.

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

做~自己de王妃 提交于 2019-12-21 07:08:06
问题 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.

Read NFC tag without specific application?

放肆的年华 提交于 2019-12-19 09:48:18
问题 I was wondering if there is any way to save a string of text (URL) to an NFC tag, let us say MIFARE or NTAG203, that can be read by other devices (smartphones) without the need of any special tag reading application. I have tested several applications, e.g. Trigger for Android, and noticed that if the device reading the tag does not have the required application to read the data/instructions off the tag it still opens a URL that sends you to the Play Store to download that application. So

NDEF Message with HCE Android

那年仲夏 提交于 2019-12-18 09:34:25
问题 I wanna emulate a host card with the HCE feature from Android. For that I extend the service class HostApduService and overwrite following method: public byte[] processCommandApdu(byte[] commandApdu, Bundle extras) { if (Arrays.equals(SELECT_APDU, commandApdu)) { NdefMessage message = new NdefMessage(new NdefRecord [] {NdefRecord.createTextRecord("en", "test"}); return message.toByteArray(); } else { return UNKNOWN_CMD_SW; } } With a second device its possible to receive data from the HCE

Android / NFC: Get Tag in onCreate() without new Intent

痞子三分冷 提交于 2019-12-17 19:37:17
问题 I am working on an NFC-application. To start my app, I am using a NDEF-tag with an AAR NDEF Record inside. This works fine. But now I want to read the tag content with the app directly. How can I do this? (It already works, when I remove the tag from the phone and touch it again, but I want to eliminate this step.) Update: Some more details Ok, to make it more clear, here are some parts of my current code. private NfcAdapter nfcAdapter; private static final int PENDING_INTENT_TECH_DISCOVERED

windows phone ndef record for skype

痞子三分冷 提交于 2019-12-13 20:13:04
问题 I want to create i NFC tag for r skype call by my phone doesn't recognise it (nokia lumia 920). This is how my ndef record looks like when is read by phone. Is there something wrong with it? Sp sub-record No.1 MB:1; ME:0; CF:0; SR:1; IL:0; Type: wkt:U Uri: skype:dd?call Sp sub-record No.2 MB:0; ME:0; CF:0; SR:1; IL:0; Type: wkt:T Language: en Encoding: UTF-8 Text: dd Sp sub-record No.3 MB:0; ME:1; CF:0; SR:1; IL:0; Type: wkt:act Payload: P.S. if it is read by android device for example is it

onNewIntent not called after tapping to another NFC enabled device

给你一囗甜甜゛ 提交于 2019-12-13 17:26:18
问题 I'm coding in c# with Xamarin. I tried to share data over NFC from one device to another. Open browser -> Options -> Share -> App4 to MainActivity Both of my devices are running the same app and I'm tapping my device to the other device, but nothing happens. I think it can't reach to onNewIntent() . Did I miss something? I have been confused and keep searching for a week. Here is my code: using System; using Android.App; using Android.Content; using Android.Runtime; using Android.Views; using

How to create an NDEF message that erases a NFC tag [closed]

北慕城南 提交于 2019-12-13 09:33:22
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I am creating an NFC application. I am a noob at Android this is my 2nd application. I was wondering if anyone knows how to create a message that erases the NFC tag. This function is seen in applications like TagWriter. 回答1: What exactly do you want to achieve? An NDEF message is a data packet that you store on

Android Read/Write to Multiple Records NDEF NFC

我与影子孤独终老i 提交于 2019-12-13 02:51:35
问题 I'm trying to write and read to/from multiple records in a NDEFMessage. Is my code here right? Also, my process terminates itself when I'm reading the tag. I'm not sure where I went wrong.. Writing part: private NdefMessage getTagAsNdef() { String text123="Hello"; //boolean addAAR = true; String uniqueId = "starbucks.com"; byte[] uriField = uniqueId.getBytes(Charset.forName("US-ASCII")); byte[] payload = new byte[uriField.length + 1]; //add 1 for the URI Prefix payload[0] = 0x01; //prefixes