Skip to content

Classic API: Communication

Hayun Lee edited this page Dec 21, 2020 · 3 revisions

Parent Document: ANT APIs

Communication API is the set of APIs for sending or receiving message via network communication.

For now, the messages are transmitted via adaptive connection switching Bluetooth and Wi-fi Direct.

You need to load communication API module before you use its API as following.

var commApi = require(process.env.ANT_BIN_DIR + 'ant').comm();

sendToCompanion()

void sendToCompanion(String receiverName, String data)

sendToCompanion() sends a string-formatted data to the target receiver process on companion device, of which name is receiverName.

Clone this wiki locally