Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can i read NFC tag in android?
    primarykey
    data
    text
    <p>Hi i am developing an android application using NFC feature. Here i tried to read NFC Mifare nfc tag. I used NFCDemo which is available with android api.But i did not get success to read data through my application. In that demo that is always reading fake tags and giving fake result only.</p> <p>I have a confusion about the manifest file intent filters. In my demo application is like this</p> <pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.android.nfc" &gt; &lt;uses-permission android:name="android.permission.NFC" /&gt; &lt;uses-permission android:name="android.permission.CALL_PHONE" /&gt; &lt;application android:icon="@drawable/icon" android:label="@string/app_name" &gt; &lt;activity android:name=".simulator.FakeTagsActivity" android:theme="@android:style/Theme.NoTitleBar"&gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.MAIN" /&gt; &lt;category android:name="android.intent.category.LAUNCHER" /&gt; &lt;/intent-filter&gt; &lt;/activity&gt; &lt;activity android:name="TagViewer" android:theme="@android:style/Theme.NoTitleBar" &gt; &lt;intent-filter&gt; &lt;action android:name="android.nfc.action.TAG_DISCOVERED"/&gt; &lt;category android:name="android.intent.category.DEFAULT"/&gt; &lt;/intent-filter&gt; &lt;/activity&gt; &lt;/application&gt; &lt;uses-sdk android:minSdkVersion="9" /&gt; &lt;uses-feature android:name="android.hardware.nfc" android:required="true" /&gt; &lt;/manifest&gt; </code></pre> <p>And the application is always starting with FakeTagsActivity activity any showing list of fake tags.When we click on any one of the fake tags it will redirect to TagViewer activity with fake data not the real tag data. I have confusion too in TagViewer activity also that is resolveIntent(Intent intent) is handling always </p> <pre><code>if (NfcAdapter.ACTION_TAG_DISCOVERED.equals(action)) {} </code></pre> <p>but i am not understanding whats the wrong with this. Please advice me am i need to modify the api demo to read real tag data. Or advice me is there any other way to read the nfc tag.</p> <p>I already tried <a href="http://mifareclassicdetectiononandroid.blogspot.in/2011/04/reading-mifare-classic-1k-from-android.html" rel="nofollow">This Sample</a> but not help full for me. Please help me. Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload