Should I use bluetooth, wifi or something else?
It depends on the situations in which you want to work in your program.
Bluetooth can provide a direct connection between your devices. The potential problem with bluetooth is that it has a limited range. If you need to be far apart, you can go with Wi-Fi. Otherwise, bluetooth may work fine.
If both devices are connected to the Internet, you can make them talk to each other. The advantage of this approach is that it doesn't matter how far apart your devices are from each other as long as they are both online. The downside is that you will need to figure out how to find the IP address of the tablet before you can talk to it. This is actually a HUGE drawback because it can be quite problematic if both devices are not on the same Wi-Fi. You can enter the user type in the destination IP address, but you will have problems with its operation if the user is behind the router (which will almost always be the case). The fact is that he is getting hairy.
If both devices are on the same Wi-Fi, you can use the ZeroConf AKA bonjour (e.g. Dancreek) to find out which IP address you need to send the information. Earlier, I used the jmdns library (easy to find using google) to implement a zero network configuration. This is good because the user does not need to worry about IP addresses ... it is intuitive for the user.
And anyway, how?
The network is a pretty big topic, so I canβt talk in detail about this issue. Short answer: it depends on which method you choose. Find some tutorials and start by sending one of your devices something simple, like int, to the other.
aleph_null
source share