Mark M. | has entered the room |
Mark M. | turned on guest access |
Apr 17 | 7:35 PM |
Vani | has entered the room |
Mark M. |
hello, Vani!
|
Mark M. |
how can I help you today?
|
Vani |
hi Mark
|
Vani |
I have a question regarding NFC
|
Vani |
I need to write an app which can send and receive messages
|
Vani |
kind of Peer to peer..
|
Vani |
but dont want to do tap or beam for each msg send
|
Vani |
is that possible with current Android NFC implementation?
|
Mark M. |
it's not possible with any NFC implementation
|
Mark M. |
NFC range is extremely short
|
Mark M. |
contact is preferable
|
Mark M. |
a centimeter might work
|
Mark M. |
for P2P over longer ranges, use NFC to bootstrap some other form of communication, like WifiDirect
|
Apr 17 | 7:40 PM |
Mark M. |
or possibly Bluetooth
|
Vani |
both devices will be in contact.. ie., tap..
|
Vani |
but I dont want to swipe each time like the beam app does..
|
Mark M. |
oh
|
Mark M. |
I have no idea if there is a way to do that
|
Vani |
swipe or tap I guess on the phone ui
|
Vani |
well,
|
Mark M. |
the NDEF-based APIs won't support that, AFAIK
|
Vani |
I dont know what to say
|
Mark M. |
there might be something at lower levels
|
Mark M. |
but I haven't tried any of that
|
Mark M. |
as NDEF is what most developers would need and what meets my needs
|
Vani |
well, we set on doing a pretty interesting app, and we kind of need NDEF to do that way..
|
Vani |
but when we went for implementing .. didnt find a way..
|
Vani |
the P2P kind of misleading in a way
|
Mark M. |
all the NDEF-based APIs are focused on sending a single NDEF message with a fixed number of NDEF records
|
Vani |
right..
|
Mark M. |
and, AFAIK, won't send another message until things are moved out of range and back together again
|
Vani |
thank you for confirming my understanding
|
Vani |
Is it possible for you to give me some direction?
|
Mark M. |
north!
|
Vani |
we are not very particular on NDEF.. it is good to have.. but
|
Vani |
:)
|
Apr 17 | 7:45 PM |
Mark M. |
sorry, bad joke -- go ahead
|
Vani |
The idea is to have few commands and responses exchanged
|
Vani |
between two NFC enabled devices, so one of the device goes and finishes the job..
|
Vani |
but to do that, with current implementation it needs going back and forth contact and taps
|
Vani |
we assumed, P2P will work for us, and decided to do that way, with NDEF.. etc
|
Vani |
but got blocked as the Android NDEF/BEAM doesnt work that way..
|
Vani |
I came across one blog about Host card emulation sample, and using the enableReadermode() apis
|
Vani |
but not sure if we can do in our context.
|
Mark M. |
that is what I meant by "lower levels"
|
Mark M. |
and I have not played with any of that, sorry
|
Apr 17 | 7:50 PM |
Vani |
will you be interested to play with them?
|
Mark M. |
it's not high on my priority list
|
Vani |
By any chance do you know if Google planning to add this support?
|
Mark M. |
I know very little about what Google is planning regarding anything :-)
|
Mark M. |
that being said, Google has previously suggested the bootstrap model I mentioned at the outset
|
Mark M. |
in fact, Android Beam does that for you, which is why you can pull the devices apart and still transfer
|
Mark M. |
it's transferring over Bluetooth
|
Mark M. |
using NFC for any act that takes more than a couple of seconds likely will be considered aggravating by users, who basically cannot move while the NFC work is going on
|
Apr 17 | 7:55 PM |
Mark M. |
hence, I will be surprised if Google emphasizes long-duration NFC transfers in the future
|
Mark M. |
but, I cannot say whether they will or they will not
|
Vani |
that is not possible for us, due to other constraints, one of the devices in question doesnt support the BT
|
Mark M. |
I presume that is custom hardware, as I cannot think of any mainstream Android device that has NFC and not Bluetooth
|
Vani |
yes, second device is not android
|
Mark M. |
OK
|
Mark M. |
that is part of the reason I do not have host card emulation high on my list -- I think you need specialized hardware on one side of the communications
|
Vani |
hmm
|
Mark M. |
and I spend enough money on hardware as it is... :-)
|
Vani |
okay, would it be okay if I come back to you on next chat with more info..
|
Mark M. |
sure
|
Vani |
Thank you for confirming about the NDEF and single message transfer
|
Mark M. |
you are very welcome
|
Vani |
I will talk to you next week then..
|
Apr 17 | 8:00 PM |
Vani |
Have a nice evening..
|
Mark M. |
you too!
|
Vani |
thanks, bye
|
Apr 17 | 8:30 PM |
Mark M. |
that's a wrap for today's chat
|
Mark M. |
the transcript will be posted to http://commonsware.com/office-hours/ shortly
|
Mark M. |
the next chat is Monday at 10am US Eastern Daylight Time
|
Mark M. |
have a pleasant day!
|
Vani | has left the room |
Mark M. | turned off guest access |