-
Notifications
You must be signed in to change notification settings - Fork 6
ASAPPeer
Thomas Schwotzer edited this page Aug 14, 2021
·
30 revisions
From developers perspective, there are just two relevant methods offered by an ASAP peer:
- an ASAP peer can be asked to deliver a message
- a listener can be informed about incomming messages
static final CharSequence YOUR_APP_NAME = "application/x-yourAppName";
static final CharSequence YOUR_URI = "yourSchema://example";
...
ASAPPeer alicePeer = ...;
byte[] serializedData = "VerySimpleExampleData".getBytes();
// send data
alicePeer.sendASAPMessage(YOUR_APP_NAME, YOUR_URI, serializedData);
// peer will send this message during each next encounter