How could you check if an android device supports SNEP or Android's Ndef Push Protocol?
Asked Answered
H

2

6

You can find this inside Android documentation:

For NDEF push to function properly the other NFC device must support either NFC Forum's SNEP (Simple Ndef Exchange Protocol), or Android's "com.android.npp" (Ndef Push Protocol). This was optional on Gingerbread level Android NFC devices, but SNEP is mandatory on Ice-Cream-Sandwich and beyond.

How could you check whether a device is capable of communicating NFC P2P with other devices? Because we have tried to test various sample NFC P2P codes with no success! (NFC tags are working perfectly).

What is currently happening is that both devices make the familiar NFC buzz sound but no data seem to be exchanged.

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

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

Heifetz answered 12/3, 2013 at 1:13 Comment(0)
D
0

I don't know how to check that, but in my memory, every device with Android > 4.0 can do SNEP.

By experience, when both device make the 'NFC sound', it's when they have seen each others, but the initialization is incorect, in this case, the data are not transmited. Can you post some of your code samples you have test ?

Note that I'm not an android dev, but I've worked on NFC's protocols, so my answer have to be taken carfully.

Down answered 31/10, 2013 at 8:22 Comment(0)
S
0

Per Android documentation:

The NFC device that is receiving the beamed data must support the com.android.npp NDEF push protocol or NFC Forum's SNEP (Simple NDEF Exchange Protocol). The com.android.npp protocol is required for devices on API level 9 (Android 2.3) to API level 13 (Android 3.2). com.android.npp and SNEP are both required on API level 14 (Android 4.0) and later.

You can use API level to check:

if api level >= 14, it's SNEP;    
else if api level >= 9, it's NPP;     
else P2P not supported.
Sogdian answered 6/3, 2014 at 23:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.