Locking mechanism of Mifare Classic 1K

The authentication keys and the access conditions for each sector of a MIFARE card are located in the last block of that sector (the sector trailer). You can update this block with new access conditions and authentication keys using a regular write command. The sector trailer looks like this: +—————————–+————–+—-+—————————–+ | 0 | 1 | … Read more

Android: Changing NFC settings (on/off) programmatically

It’s not possible programatically without rooting device. But you can start NFC Settings Activity by intent action Settings.ACTION_NFC_SETTINGS for api level 16 and above. For api < 16 use Settings.ACTION_WIRELESS_SETTINGS Previous selected answer suggests to use WIFI_SETTINGS but we can directly move to NFC_SETTINGS Here’s the example : android.nfc.NfcAdapter mNfcAdapter= android.nfc.NfcAdapter.getDefaultAdapter(v.getContext()); if (!mNfcAdapter.isEnabled()) { AlertDialog.Builder … Read more

How to write NDEF records to NFC tag?

I would ignore what the Google documentation says for reading at https://developer.android.com/guide/topics/connectivity/nfc/nfc and for read/write at https://developer.android.com/guide/topics/connectivity/nfc/advanced-nfc#read-write as this provides a very poor user experience for writing to Tags and leads to a lot of failed writes because of user behaviour. To get reliable writing to NFC with Android you should use the newer and … Read more