I am working to build an application that uses Network Service Discovery. I have followed up this post http://developer.android.com/training/connect-devices-wirelessly/nsd-wifi-direct.html and the application is working but I have a couple of questions based on the code shown below.
WifiP2pDnsSdServiceInfo.newInstance("_test", "_presence._tcp", record);
It seems like the record cannot hold much of data. For instance if the record size is 20, the info is not dispatched. Can you tell me about the size limitation? How much of data can I send?
I am not clear about the available service types like _presence._tcp. Is it vendor specific? A list of the supported service types will be nice to know. Does the service type dictate the amount of info I can send? If so, which service types are preferable for sending a good sized map.
An update: I have checked this draft at http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt and please see section 6.2 DNS-SD TXT Record Size. It looks like the size limit is small as stated "The total size of a typical DNS-SD TXT record is intended to be small -- 200 bytes or less. In cases where more data is justified (e.g. LPR printing [BJP]), keeping the total size under 400 bytes should allow it to fit in a single 512-byte DNS message ". Any thoughts?