protected override async void OnCreate(Bundle bundle) { base.OnCreate(bundle); FacebookSdk.SdkInitialize(this); SetFullscreenOptions(); SetContentView(Resource.Layout.StartActivity); var gps = new GpsLocationService(this, this); if (!gps.CanGetLocation) { settingsAlertIsShow = true; gps.ShowSettingsAlert(); } try { userIsLogged = await SignInUser(); } catch (Exception) { AlertsService.ShowAlertDialog(this, "Wystąpił problem z połączeniem z serwerem. Spróbuj ponownie później"); } if (!settingsAlertIsShow) { StartMainOrLoginActivity(userIsLogged); } else { actionToExecuteAfterCloseSettingsDialog = StartMainOrLoginActivity; } }
public static GpsLocationService GetServiceInstance(Context context, ISettingWindowCloseListener listener = null) { if (serviceInstance == null) { serviceInstance = new GpsLocationService(context, listener); } return(serviceInstance); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); this.gpsLocationService = new GpsLocationService(this, null); SetContentView(Resource.Layout.AddNewAdvertisementActivity); SetupViews(savedInstanceState); if (savedInstanceState != null) { RestoreViewFieldsValues(savedInstanceState); } }
protected override async void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); this.gpsLocationService = new GpsLocationService(this, null); this.sharedPreferencesHelper = new SharedPreferencesHelper(this); SetContentView(Resource.Layout.MainActivity); SetupToolbar(); advertisementsPage = savedInstanceState == null ? 0 : savedInstanceState.GetInt(ExtrasKeys.ADVERTISEMENTS_LIST_PAGE); await SetupViews(savedInstanceState != null); }