protected override async void OnCreate(Bundle bundle) { base.OnCreate(bundle); _session = Resolver.Instance.Get <ISalesAppSession>(); _logger.Initialize(this.GetType().FullName); SetContentView(Resource.Layout.layout_welcome); this.AddToolbar(Resource.String.app_name, true); UiPermissionsController.SetViewsVisibilty(); _sharedPrefService = Resolver.Instance.Get <ISharedPrefService>(); _welcomeView = new WelcomeView(FindViewById <ViewGroup>(Resource.Id.welcomeRoot), this); _welcomeView.SetUser(_session.FirstName, _session.LastName); _welcomeView.RegisterProspectTouched += welcomeView_registerProspectTouched; _welcomeView.SwapComponentsTouched += (sender, e) => StartActivity(new Intent(this, typeof(SwapComponentsActivity))); FindViewById <RelativeLayout>(Resource.Id.btnRaiseIssue) .Click += (sender, e) => { new IntentStartPointTracker() .StartIntentWithTracker ( this , IntentStartPointTracker.IntentStartPoint.WelcomeScreen , typeof(TicketStartActivity) ); }; _welcomeView.RegisterCustomerTouched += welcomeView_registerCustomerTouched; // check Location setting status from OTA // If its true then we check whether location settings on the device are on if (Settings.Instance.EnableLocationInfo) { if (!_locationListener.IsLocationOn()) { string acceptLocationTracking = _sharedPrefService.Get("accept_location_tracking"); if (acceptLocationTracking == null || !acceptLocationTracking.Equals("NO")) { CheckLocationStatus(); } } } // set app Google analytics GoogleAnalyticService.Instance.Initialize(this); Logger.Verbose("Creating new instance of CustomerPhotoUploaderReceiver"); _customerPhotoUploaderReceiver = new CustomerPhotoUploaderReceiver(); _photoUploadServiceIntent = new Intent(this, typeof(CustomerPhotoUploadService)); // start the customer photo upload service StartService(_photoUploadServiceIntent); }
public override void SetViewPermissions() { UiPermissionsController.RegisterViews( new ViewPermission(Resource.Id.btnNewProspect, Permissions.RegisterProspect), new ViewPermission(Resource.Id.btnNewCustomer, Permissions.RegisterCustomer), new ViewPermission(Resource.Id.button_manage_stock, Permissions.StockManagement), new ViewPermission(Resource.Id.btnSwapComponents, Permissions.SwapComponents), new ViewPermission(Resource.Id.btnRaiseIssue, Permissions.RaiseIssue)); }