Skip to content

Instantly share code, notes, and snippets.

@e-lin
Created June 26, 2019 03:02
Show Gist options
  • Save e-lin/c37e48fdd2e3e6fb9d42326803c2d138 to your computer and use it in GitHub Desktop.
Save e-lin/c37e48fdd2e3e6fb9d42326803c2d138 to your computer and use it in GitHub Desktop.
Subscribe to a Nearby Message 1 - configuration
val strategy = Strategy.Builder()
.setDiscoveryMode(Strategy.DISCOVERY_MODE_SCAN)
.setTtlSeconds(Strategy.TTL_SECONDS_MAX)
.build()
val subscribeOpts = SubscribeOpts.Builder()
.setStrategy(strategy)
.setCallback(object : setCallback() {
override fun onExpired() {
Log.d(TAG, "onExpired")
}
})
.build()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment