How could you check if your Android device supports SNEP or Android Ndef Push Protocol?

You can find this in the Android documentation :

For the NDEF to work properly for another NFC device, you must support the NEP Forum SNEP (Simple Ndef Exchange Protocol) or Android "com.android.npp" (Ndef Push Protocol). This was not necessary for Gingerbread-level Android NFC devices, but SNEP is required for Ice-Cream-Sandwich and above.

How can you check if the device supports NFC P2P communication with other devices? Because we tried to test various examples of NFC P2P codes without success! (NFC tags work fine).

It is currently happening that both devices produce the familiar NFC noise sound, but the data does not seem to be exchanging.

FYI devices are Sony Xperia Sole / Sola and LG Optimus 4X HD, updated with versions of Android 4.0.4 and 4.0.3, respectively.

Also note: development is on the Gingerbread version, Android API version 10.

+6
source share
2 answers

I do not know how to check this, but in my memory every device with Android> 4.0 can perform SNEP.

From experience, when both devices create an โ€œNFC soundโ€, it, when they saw each other, but the initialization is introduced, in this case no data is transmitted. Can you post some of your sample code that you have?

Please note that I am not an Android developer, but I worked on NFC protocols, so my answer should be taken carefully.

0
source

In the documentation for Android :

An NFC device that receives data with beams must support com.android.npp NDEF push protocol or NFC SNEP forum (Simple NDEF Exchange Protocol). The com.android.npp protocol is required for devices at API level 9 (Android 2.3) up to API level 13 (Android 3.2). com.android.npp and SNEP are both required at API level 14 (Android 4.0) and later.

You can use the API level to check:

if api level >= 14, it SNEP; else if api level >= 9, it NPP; else P2P not supported. 
0
source

All Articles