Exemple #1
0
        protected override void OnDestroy()
        {
            string dir_path = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal);

            File.Delete(dir_path + "user_data.txt");

            //CrossSettings.Current.AddOrUpdateValue("PresenceOnPage", "false");
            StaticUser.PresenceOnPage = false;
            //CrossSettings.Current.AddOrUpdateValue("role", "");
            //StartUp.StopTracking(this);

            if (StaticDriver.busy == "0")
            {
                _gpsService = new GPSService(this);
                //_gpsService.UpdateLocation();
                _gpsService.RemoveLocation();
            }

            base.OnDestroy();
            //StartUp.StopTracking();
        }
Exemple #2
0
        private void Leaveprofile()
        {
            string dir_path = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal);

            File.Delete(dir_path + "user_data.txt");

            //CrossSettings.Current.AddOrUpdateValue("PresenceOnPage", "false");
            StaticUser.PresenceOnPage = false;
            CrossSettings.Current.AddOrUpdateValue("role", "");
            StartUp.StopTracking(this);


            if (StaticDriver.busy == "0")
            {
                _gpsService = new GPSService(this);
                //_gpsService.UpdateLocation();
                _gpsService.RemoveLocation();
            }

            Intent content1 = new Intent(this, typeof(MainActivity));

            StartActivity(content1);
            this.Finish();
        }