Skip to content

Instantly share code, notes, and snippets.

@agap
Last active June 23, 2020 20:50
Show Gist options
  • Save agap/88547012b996118b29b0c39e24b0cc5d to your computer and use it in GitHub Desktop.
Save agap/88547012b996118b29b0c39e24b0cc5d to your computer and use it in GitHub Desktop.
val beaconLayout = "<beacon-layout>" // search the Internet to find the layout string of your specific beacon
val beaconParser = BeaconParserFactory.createFromLayout(beaconLayout)
val beaconScanner = BeaconScanner.Builder(this)
.setBeaconParser(beaconParser)
.setBeaconBatchListener { beacons: Collection<Beacon> ->
// do something with your beacons here
}
.build()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment