public void OnBeaconServiceConnect() { BeaconService beaconService = Xamarin.Forms.DependencyService.Get <BeaconService>(); UserDataService userDataService = new UserDataService(); beaconService.StartBeacon(); if (userDataService.IsExistUserData()) { UserDataModel userDataModel = userDataService.Get(); beaconService.StartAdvertising(userDataModel); } }
public void OnBeaconServiceConnect() { BeaconService beaconService = DependencyService.Get <BeaconService>(); UserDataService userDataService = new UserDataService(); Task.Run(() => { beaconService.StartBeacon(); if (userDataService.IsExistUserData) { UserDataModel userDataModel = userDataService.Get(); beaconService.StartAdvertising(userDataModel); } }); }