ndef

Writing an image using NdefMessage

廉价感情. 提交于 2019-12-07 21:52:24
问题 I am trying to write an image on a Ndef Tag, currently, i am able to write it, but when I try to read it with any market application, they treat it like a text message. here is my piece of code writing the image : Bitmap mBitmap = Bitmap.createScaledBitmap(mPhoto, 100, 100, true); ByteArrayOutputStream stream = new ByteArrayOutputStream(); mBitmap.compress(Bitmap.CompressFormat.PNG, 100, stream); byte[] byteArray = stream.toByteArray(); NdefRecord picRecord = new NdefRecord(NdefRecord.TNF

How to interpret NDEF content on Mifare Classic 1K

雨燕双飞 提交于 2019-12-07 14:47:30
问题 I write a text to a Mifare Classic 1K tag using the NFC Tools app on my Android device (through the built-in NFC reader). This text is "moretto" (my last name). Then, I'm trying to read this text (NDEF format) using the NFC reader ACR1255U with the library provided by ACS. I am able to get following: Read block 4: FF B0 00 04 10 response: 0000030ED1010A5402656E6D6F726574 9000 Read block 5: FF B0 00 05 10 response: 746FFE00000000000000000000000000 9000 I know that FE indicates the end of

Android Beam - payload transfer from both devices when only one Touch To Beam?

青春壹個敷衍的年華 提交于 2019-12-06 17:21:28
问题 Ok, I watched the Google I/O from 2011 presentation on NFC on peer to peer. The demo was done on Gingerbread and using the application Sticky Notes found Now in this demo, both device the onNewIntent() was called at the same time so both devices are trying to share information to one another. On ICS and above, you have Android Beam.. With Android Beam, you have to touch to trigger the onNewIntent() event that will send the NDef message across. Now the problem with this is that now to trigger

Unable to authenticate to a MIFARE Classic tag used as NDEF tag

∥☆過路亽.° 提交于 2019-12-06 13:47:53
问题 I'm using an ACR 1255U-J1 as external reader connected through Bluetooth. The library I use to access the reader is acsbt-1.0.0preview7. I use the following commands to authenticate to sector 1 (block 4) of a MIFARE Classic tag: FF 82 0000 06 FFFFFFFFFFFF FF 86 0000 05 01 00 04 60 00 When I authenticate to an empty MIFARE Classic tag (with manufacturer default configuration), I receive the response status word 9000 . This indicates that authentication was successful. However, when I try to

Testing an app by faking NFC tag scan

扶醉桌前 提交于 2019-12-06 09:33:46
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 1st activity. Whereas I have created one more activity capable of handling that same intent. The reading

How to read from detected NFC tag (NDEF message). Android NFC

只愿长相守 提交于 2019-12-06 08:29:58
问题 Similar question - How to read detected NFC tag (NDEF content) details in android? I want my android app to be able to read and parse a detected NDEF message. I have already edited the AndroidManifest.xml to detect nfc tags and I have added the intent filter it looks like this <intent-filter> <action android:name="android.nfc.action.TAG_DISCOVERED"/> <category android:name="android.intent.category.DEFAULT"/> </intent-filter> I believe this is fine as when I use the NFCDemo sample app that

Writing an image using NdefMessage

若如初见. 提交于 2019-12-06 08:03:22
I am trying to write an image on a Ndef Tag, currently, i am able to write it, but when I try to read it with any market application, they treat it like a text message. here is my piece of code writing the image : Bitmap mBitmap = Bitmap.createScaledBitmap(mPhoto, 100, 100, true); ByteArrayOutputStream stream = new ByteArrayOutputStream(); mBitmap.compress(Bitmap.CompressFormat.PNG, 100, stream); byte[] byteArray = stream.toByteArray(); NdefRecord picRecord = new NdefRecord(NdefRecord.TNF_MIME_MEDIA, "image/png".getBytes(), null, byteArray); String informations = "name: "+name + "\ntitle: " +

Accessing card-emulation mode on USB-NFC-Reader

萝らか妹 提交于 2019-12-05 12:53:23
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-capable Android phone should be able to scan this emulated tag and automatically open the browser. I

Android Beam - payload transfer from both devices when only one Touch To Beam?

不羁的心 提交于 2019-12-04 21:54:08
Ok, I watched the Google I/O from 2011 presentation on NFC on peer to peer. The demo was done on Gingerbread and using the application Sticky Notes found Now in this demo, both device the onNewIntent() was called at the same time so both devices are trying to share information to one another. On ICS and above, you have Android Beam.. With Android Beam, you have to touch to trigger the onNewIntent() event that will send the NDef message across. Now the problem with this is that now to trigger the onNewIntent() on both devices, both user on each device has to "Touch To Beam" at the same time. Is

Unable to authenticate to a MIFARE Classic tag used as NDEF tag

随声附和 提交于 2019-12-04 20:16:17
I'm using an ACR 1255U-J1 as external reader connected through Bluetooth. The library I use to access the reader is acsbt-1.0.0preview7. I use the following commands to authenticate to sector 1 (block 4) of a MIFARE Classic tag: FF 82 0000 06 FFFFFFFFFFFF FF 86 0000 05 01 00 04 60 00 When I authenticate to an empty MIFARE Classic tag (with manufacturer default configuration), I receive the response status word 9000 . This indicates that authentication was successful. However, when I try to authenticate to a MIFARE Classic tag that has been formatted for use as an NDEF tag, the returned status