Skip to content

Instantly share code, notes, and snippets.

@ricardoogliari
Created November 5, 2018 01:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ricardoogliari/478de1dfe0ee956301bdbb33b1870421 to your computer and use it in GitHub Desktop.
Save ricardoogliari/478de1dfe0ee956301bdbb33b1870421 to your computer and use it in GitHub Desktop.
public override fun onStart() {
super.onStart()
Nearby.getMessagesClient(this).subscribe(mMessageListener!!)
}
public override fun onStop() {
if (message != null)
Nearby.getMessagesClient(this).unpublish(message!!)
Nearby.getMessagesClient(this).unsubscribe(mMessageListener!!)
super.onStop()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment