Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public ShowroomManager : BeaconManager.IServiceReadyCallback {
- private BeaconManager beaconManager;
- private string scanId;
- public ShowroomManager(Context context) {
- beaconManager = new BeaconManager(context);
- beaconManager.Eddystone += BeaconManager_Eddystone;
- }
- public void StartUpdates() {
- beaconManager.Connect(this); // throws "callback cannot be null" exception
- }
- public void StopUpdates() {
- beaconManager.StopEddyStoneScanning(scanId);
- }
- private void BeaconManager_Eddystone(object sender, BeaconManager.EddystoneEventArgs e) {
- // ...
- }
- // Implementation of IServiceReadyCallback interface:
- public void OnServiceReady() {
- scanId = beaconManager.StartEddystoneScanning();
- }
- public IntPtr Handle { get; }
- public void Dispose() {
- // throw new NotImplementedException();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement