ndef

How to simulate the tag touch from other application

帅比萌擦擦* 提交于 2019-11-29 17:18:40
I want to simulate the touch event for my application. My manifest is like <activity android:name=".activity.TagActivity_" android:label="@string/app_name" android:launchMode="singleTask" android:noHistory="true" android:permission="android.permission.NFC" android:screenOrientation="portrait" > <intent-filter> <action android:name="android.nfc.action.TECH_DISCOVERED" /> </intent-filter> <meta-data android:name="android.nfc.action.TECH_DISCOVERED" android:resource="@xml/nfc_tech_filter" /> <intent-filter> <action android:name="android.nfc.action.NDEF_DISCOVERED" /> <category android:name=

Writing NDEF data to NTAG216 tag using low-level NFC communication methods

给你一囗甜甜゛ 提交于 2019-11-29 16:26:00
问题 I have implemented the code to interact with an NTAG216 by means of low-level communication methods (following NTAG212 Mifare Ultralight with Authentication and the datasheet of NTAG216). What I have achieved so far: Set password write protection on NTAG216 if not set or if new/blank tag. If password is already set, authenticate using PWD_AUTH and comparing PACK. Read data. Write/overwrite data. What I haven't been able to do so far: Detect NDEF messages that I write to the tag in other apps.

Picture on NFC tags

自古美人都是妖i 提交于 2019-11-29 08:48:32
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? 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=MIME + +----------------------------------------+ + Type Length = 10 + +--------------------------------------

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

淺唱寂寞╮ 提交于 2019-11-29 05:11:10
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). NFC guy 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.getType(); // tag type // get NDEF message details NdefMessage ndefMesg = ndefTag.getCachedNdefMessage(

Android: How do I temporarily handle an Intent in a different activity of my application?

南楼画角 提交于 2019-11-28 13:06:09
问题 I am developing an application that is NFC-aware. Today I have an intent-filter in my manifest for handling NFC "bumps" that have NDEF records: <intent-filter> <action android:name="android.nfc.action.NDEF_DISCOVERED" /> <category android:name="android.intent.category.DEFAULT" /> <data android:scheme="wifi" /> <data android:scheme="socket" /> </intent-filter> This works just fine. The app has a "select an item" activity and a "view" activity. As currently written, the Intent is handled in the

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

ε祈祈猫儿з 提交于 2019-11-28 10:36:21
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 = 1; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

How to simulate the tag touch from other application

大兔子大兔子 提交于 2019-11-28 10:27:55
问题 I want to simulate the touch event for my application. My manifest is like <activity android:name=".activity.TagActivity_" android:label="@string/app_name" android:launchMode="singleTask" android:noHistory="true" android:permission="android.permission.NFC" android:screenOrientation="portrait" > <intent-filter> <action android:name="android.nfc.action.TECH_DISCOVERED" /> </intent-filter> <meta-data android:name="android.nfc.action.TECH_DISCOVERED" android:resource="@xml/nfc_tech_filter" />

Adding NuGet ndef library to windows phone 8 project

不羁的心 提交于 2019-11-28 02:03:37
So I tried to add the NDEF library for proximity application in Visual Studio 2012 for a Windows Phone 8 app. In Package Manager I checked Allow NuGet to download missing packages during build and in the Solution Explorer I selected Enable NuGet Package Restore . So far so good, but when i try to install the package I get the following error: Could not install package ' NdefLibrary 0.9.0.1 '. You are trying to install this package into a project that targets ' WindowsPhone,Version=v8.0 ', but the package does not contain any assembly references that are compatible with that framework. For more

Strange character on Android NDEF record payload

别等时光非礼了梦想. 提交于 2019-11-27 16:45:01
问题 I just started coding with Android NFC, i've successfully read and write NDEF data into mifare classic tag. The problem is when app read the payload from ndef record, it always contain character '*en' at the beginning of the text. I think it is language character, but how to get the real text message without that character? This is the screenshot what app read from the tag, the actual text is 'Hello World' Here is the code to read @Override public void onNewIntent(Intent intent) { Log.i(

Adding NuGet ndef library to windows phone 8 project

删除回忆录丶 提交于 2019-11-26 22:08:54
问题 So I tried to add the NDEF library for proximity application in Visual Studio 2012 for a Windows Phone 8 app. In Package Manager I checked Allow NuGet to download missing packages during build and in the Solution Explorer I selected Enable NuGet Package Restore . So far so good, but when i try to install the package I get the following error: Could not install package ' NdefLibrary 0.9.0.1 '. You are trying to install this package into a project that targets ' WindowsPhone,Version=v8.0 ', but