コード例 #1
0
ファイル: MainActivity.cs プロジェクト: suzukin/Covid19Radar
        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);
            }
        }
コード例 #2
0
        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);
                }
            });
        }