How to launch my app via NFC tag?

Windows 10 Mobile UWP If you are only targeting Windows 10 Mobile, the 8.1 way still works, given that you get the right App ID. It can be retrieved through: Windows.ApplicationModel.Store.CurrentApp.AppId However, that only works when the app is installed through the store, as the ID is assigned during store association / publishing. In developer … Read more

How to check whether NFC is enabled or not in android?

NfcManager manager = (NfcManager) context.getSystemService(Context.NFC_SERVICE); NfcAdapter adapter = manager.getDefaultAdapter(); if (adapter != null && adapter.isEnabled()) { // adapter exists and is enabled. } You cannot enable the NFC programmatically. The user has to do it manually through settings or hardware button.

Android: Authenticating with NXP MiFare Ultralight C

Below is an example java code to perform Ultralight-C authentication as described in MF0ICU2 / MIFARE Ultralight C – Contactless ticket IC document (chapter 7.5.5 — 3DES Authentication, page 15): public void authenticate(byte[] key) throws CardException { System.out.println(“AUTHENTICATE”); byte[] encRndB = transmitRaw(new byte[] { 0x1A, 0x00 }); if((encRndB.length!=9)||(encRndB[0]!=AF)) { throw new RuntimeException(“Invalid response!”); } encRndB=Arrays.copyOfRange(encRndB, … Read more

Emulate Mifare card with Android 4.4

With host-based card emulation (HCE) in Android 4.4 you can only emulate the ISO/IEC 14443-4 protocol. More specifically you can only emulate application structures according to ISO/IEC 7816-4 (thus card emulation applications need to be selected though an AID). Moreover, the API doesn’t give you any means to specify if card emulation should be done … Read more

Serials on NFC Tags – truly unique? cloneable?

Are serial numbers of NFC tags truely unique? That depends on the tag product and what you consider truely unique. E.g.: ISO 14443 Type A tags with 4 byte serial numbers: There certainly exist duplicates (mainly because there is no clear scheme to divide the available range of serial numbers among the various manufacturers) and … Read more