简体   繁体   中英

Bluetooth gaming on Android/iOS

How can I play bluetooth chess with my iPhone and my friend's Android device? Api? (Probably duplicate of other questions)

ZeroConf aka Bonjour is a fine way to discover other devices providing services, and it's limited to the local network. One of its best features is that it doesn't require any prior knowledge or setup -- it's mission is service discovery .

Why not just use a web service? It'd be easier than doing bluetooth discovery and pairing or wifi-server client stuff (trust me, at least on the latter). It's the easiest way to make everything relatively network (ie 3g/4g/wifi) independent. You just have a simple protocol your app follows, and you can play with all players everywhere, no discovery needed. Probably less battery drain than bluetooth too.

Bonjour is great for discovering stuff (ie other players) on the same network. The problem with bonjour is you usually need to be on the same wifi network (though not necessarily, but don't ask me how the hell this works, but it can be done apparently). You'd also in theory need to apply for an bonjour/mdns id, though this is pretty easy.

Here's a similar question .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM