public App(params INinjectModule[] platformModules) { InitializeComponent(); GoogleMapsApiService.Initialize("AIzaSyCUsCIh3EgQ74aJ3XJ2kvfMPXQ8jH9veyk"); var mainPage = new NavigationPage(new MainPage()); var settings = new Ninject.NinjectSettings() { LoadExtensions = false }; // Register core services Kernel = new StandardKernel( settings, new CateringCoreModule(), new CateringNavModule(mainPage.Navigation)); // Register platform specific services Kernel.Load(platformModules); // Get the MainViewModel from the IoC mainPage.BindingContext = Kernel.Get <MainViewModel>(); MainPage = mainPage; }
public App() { InitializeComponent(); PCA = PublicClientApplicationBuilder.Create(Constants.ClientId) .WithRedirectUri($"msal{Constants.ClientId}://auth") .WithIosKeychainSecurityGroup("com.microsoft.adalcache") .Build(); AuthenticationClient = PublicClientApplicationBuilder.Create(Constants.ClientId) .WithIosKeychainSecurityGroup(Constants.IosKeychainSecurityGroups) .WithB2CAuthority(Constants.AuthoritySignin) .WithRedirectUri($"msal{Constants.ClientId}://auth") .Build(); GoogleMapsApiService.Initialize(Constants.GoogleMapsApiKey); IGoogleMapsApiService googleMapsApi = new GoogleMapsApiService(); //string refreshToken = Xamarin.Essentials.SecureStorage.GetAsync("RefreshToken").Result; var isLogged = Xamarin.Essentials.SecureStorage.GetAsync("IsLogged").Result; //FirebaseToken = DependencyService.Get<IFirebaseAuthenticator>().IsLoggedIn().Result; if (isLogged == "1") { UserName = Xamarin.Essentials.SecureStorage.GetAsync("UserName").Result; UserEmail = Xamarin.Essentials.SecureStorage.GetAsync("UserEmail").Result; PaymentId = Xamarin.Essentials.SecureStorage.GetAsync("PaymentId").Result; MainPage = new AppShell(); } else { MainPage = new NavigationPage(new Login()); } }
public App() { InitializeComponent(); Device.SetFlags(new string[] { "Expander_Experimental" }); GoogleMapsApiService.Initialize(Constant.GoogleMapsApiKey); MainPage = new NavigationPage(new RegistrationPage()); }
public StoreViewModel(INavigationService navigationService, IAppService appService, GoogleMapsApiService googleMapsApiService) : base(navigationService) { _appService = appService; _googleMapsApiService = googleMapsApiService; AsyncRunner.Run(Processing()); }
public App() { InitializeComponent(); DependencyService.Register <JobsDataStore>(); GoogleMapsApiService.Initialize(Constants.GoogleMapsApiKey); MainPage = new AppShell(); }
public App() { InitializeComponent(); GoogleMapsApiService.Initialize(Constants.GoogleMapsApiKey); MainPage = new NavigationPage(new MainPage()) { BarTextColor = Color.Black }; }
public void Setup() { var configuration = Substitute.For <IConfiguration>(); configuration[DistanceMatrixUrl].Returns(DistanceMatrixUrlValue); configuration[GeocodingUrl].Returns(GeocodingUrlValue); configuration[GoogleMapsApiKey].Returns(GoogleMapsApiKeyValue); _client = Substitute.For <IHttpClient>(); _googleMapsApiService = new GoogleMapsApiService(configuration, _client); }
private void SetMapAPIKey() { var bundle = PackageManager.GetApplicationInfo(PackageName, Android.Content.PM.PackageInfoFlags.MetaData).MetaData; foreach (var key in bundle.KeySet()) { if (key == "com.google.android.geo.API_KEY") { GoogleMapsApiService.Initialize(bundle.GetString(key)); } } }
public SelectResidenceViewModel() { GetPlacesCommand = new Xamarin.Forms.Command <string>(async param => await GetPlacesByName(param)); GetPlaceDetailCommand = new Xamarin.Forms.Command <GooglePlaceAutoCompletePrediction>( async param => await GetPlacesDetail(param)); Places = new ObservableRangeCollection <GooglePlaceAutoCompletePrediction>(); GoogleMapsApiService.Initialize("AIzaSyAnMLFzwkR17l4TfHYiBou6ZXmPRsLgpNg"); ClearSelectedPlaceCommand = new Command(() => { SelectedPlace = null; PlaceSelected = null; }); ConfirmSelectedPlaceCommand = new AsyncCommand(ConfirmPlace); }
public App() { InitializeComponent(); GoogleMapsApiService.Initialize(Services.GoogleMaps.Constants.GoogleMapsApiKey); #if DEBUG App.User = new UserDTO { Id = 55, CompanyId = 8, CompanyName = "Firma 4 Yolcu Tasimacili", Email = "olcayyf @hotmail.com", NameSurname = "Feryat Olcay", Phone = "05378217440", RoleId = 1 }; App.IsUserLoggedIn = true; #else MainPage = new NavigationPage(new LoginPage()); #endif MainPage = new NavigationPage(new MainMenu()); }
protected override async void OnInitialized() { InitializeComponent(); GoogleMapsApiService.Initialize(Constants.GoogleMapsApiKey); var token = JsonConvert.DeserializeObject <TokenResponse>(Settings.Token); if (Settings.IsRemembered && token?.Expiration > DateTime.Now) { await NavigationService.NavigateAsync("/LeasingMasterDetailPage/NavigationPage/PropertiesPage"); } else { await NavigationService.NavigateAsync("/NavigationPage/HomePage"); } }
public App() { InitializeComponent(); CrossMedia.Current.Initialize(); GoogleMapsApiService.Initialize(Constants.GoogleMapsApiKey); OneSignal.Current.StartInit("0df18d37-de4c-4705-87cb-c1d2f3c789d1") .EndInit(); if (Preferences.Get("Cadastrado", "default_value") != "true") { // para Modal ......... MainPage = new CadastrarPage(); Application.Current.MainPage = new MainPage { Detail = new NavigationPage(new CadastrarPage()) }; } else { if (Preferences.Get("Autenticado", "default_value") != "true") { // para Modal ......... MainPage = new CadastrarPage(); Application.Current.MainPage = new MainPage { Detail = new NavigationPage(new LoginPage()) }; } else { Application.Current.MainPage = new MainPage { Detail = new NavigationPage(new ViagensPage()) }; } } }
public App() { Device.SetFlags(new string[] { "Brush_Experimental" }); InitializeComponent(); auth = DependencyService.Get <IAuth>(); GoogleMapsApiService.Initialize(Constants.GoogleMapsApiKey); MainPage = new MainTabPage(); if (auth.SignIn()) { MainPage = new SplashScreen(); } else { MainPage = new SplashScreen(); } }
public App() { InitializeComponent(); GoogleMapsApiService.Initialize(Constants.GoogleMapsApiKey); MainPage = new MainPage(); }
public ApiProvider(LocationIQApiService locationIQApiService, GoogleMapsApiService googleMapsApiService) { _locationIQApiService = locationIQApiService; _googleMapsApiService = googleMapsApiService; }
public void Init() { _services = new GoogleMapsApiService(new GoogleMapsApiSettings(ReadApiKey())); }
public App() { InitializeComponent(); GoogleMapsApiService.Initialize(GlobalConfiguration.GoogleMapsApiKey); MainPage = new AppShell(); }
public void Geocoding_ApiKey_Access_Denied() { _services = new GoogleMapsApiService(new GoogleMapsApiSettings("apiinvalid_324324234324324")); var response = Geocoding("Manhattan, Nueva York 10036, EE. UU.", GoogleMapsResponseStatus.REQUEST_DENIED); }