protected override void OnCreate(Bundle bundle) { AppSettings.TrackingId = "UA-65892866-1"; AppSettings.RegisterTypes(); Logger.Instance = new AndroidLogger(); Mvx.RegisterType <IToastService, ToastService> (); Mvx.RegisterType <IAnalyticsService, AnalyticsService> (); base.OnCreate(bundle); SetContentView(Resource.Layout.Main); _apiService = Mvx.Resolve <IApiService> (); _toastService = Mvx.Resolve <IToastService> (); _loginService = Mvx.Resolve <ILoginService> (); IsLoading = true; CheckUserExists(); Button button = FindViewById <Button> (Resource.Id.button_register); button.Click += ClickHandler; AppLocation.Current.LocationServiceConnected += (object sender, ServiceConnectedEventArgs e) => { }; AppLocation.StartLocationService(); }
static AppLocation () { current = new AppLocation (); }
static AppLocation() { current = new AppLocation(); }
async void Logout() { AppLocation.StopLocationService(); Android.OS.Process.KillProcess(Android.OS.Process.MyPid()); }