How to enable NFC on your android app and read a TAG

First of all you need to enable the NFC beam on your AndroidManifest.xml:

<uses-permission android:name="android.permission.NFC"/>
<!-- Use the required="true" if your application will not function properly unless the device HAS an NFC hardware-->
<uses-feature android:name="android.hardware.nfc" android:required="true"/>