Skip to content

Instantly share code, notes, and snippets.

@e-lin
Created June 26, 2019 02:56
Show Gist options
  • Save e-lin/6c6f5c57cbd7bb94c73f29eaa7a87f9e to your computer and use it in GitHub Desktop.
Save e-lin/6c6f5c57cbd7bb94c73f29eaa7a87f9e to your computer and use it in GitHub Desktop.
Publish a Nearby Message 2 - publish
val client = Nearby.getMessagesClient(this)
val message = Message("Hi, Firebase Thing.")
client.publish(message, publishOpts)
.addOnSuccessListener(this) {
Log.e(TAG, "publish scucess")
}
.addOnFailureListener(this) { e ->
Log.e(TAG, "publish failed", e)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment