Last active
November 9, 2019 18:13
-
-
Save Suchiq/f234b8933e1fe4f1a76222ba6a8c848b to your computer and use it in GitHub Desktop.
Send Payload Method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void sendPayLoad(final String endPointId) { | |
Payload bytesPayload = Payload.fromBytes(String.valueOf(timestamp).getBytes()); | |
Nearby.getConnectionsClient(BaseApplication.getInstance() | |
.getActivity()).sendPayload(endPointId, bytesPayload).addOnSuccessListener(new OnSuccessListener<Void>() { | |
@Override | |
public void onSuccess(Void aVoid) { | |
} | |
}).addOnFailureListener(new OnFailureListener() { | |
@Override | |
public void onFailure(@NonNull Exception e) { | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment