protected override void AttachBaseContext(Context context) { base.AttachBaseContext(context); AGConnectServicesConfig config = AGConnectServicesConfig.FromContext(context); config.OverlayWith(new HmsLazyInputStream(context)); }
public override bool OnCreate() { AGConnectServicesConfig config = AGConnectServicesConfig.FromContext(Context); config.OverlayWith(new HmsLazyInputStream(Context)); return(false); }
protected override void AttachBaseContext(Context context) { base.AttachBaseContext(context); AGConnectServicesConfig config = AGConnectServicesConfig.FromContext(context); config.OverlayWith(new HmsLazyInputStream(context)); // Read api_key entry from config // and assign to apiKey property apiKey = ReadApiKeyFromConfig(config); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); Xamarin.Essentials.Platform.Init(this, savedInstanceState); MapsInitializer.Initialize(this); // Set our view from the "main" layout resource SetContentView(Resource.Layout.activity_main); AGConnectServicesConfig config = AGConnectServicesConfig.FromContext(ApplicationContext); config.OverlayWith(new HmsLazyInputStream(this)); Com.Huawei.Agconnect.AGConnectInstance.Initialize(this); checkPermission(new string[] { Android.Manifest.Permission.WriteExternalStorage, Android.Manifest.Permission.ReadExternalStorage, Android.Manifest.Permission.AccessCoarseLocation, Android.Manifest.Permission.AccessFineLocation, Android.Manifest.Permission.Internet }, 100); //get mapview instance mMapView = FragmentManager.FindFragmentById <MapFragment>(Resource.Id.mapview); btnMarkersDemo = FindViewById <Button>(Resource.Id.btnMarkersDemo); btnPolylineDemo = FindViewById <Button>(Resource.Id.btnPolylineDemo); btnPolygonDemo = FindViewById <Button>(Resource.Id.btnPolygonDemo); btnCircleDemo = FindViewById <Button>(Resource.Id.btnCircleDemo); btnOverlayDemo = FindViewById <Button>(Resource.Id.btnOverlayDemo); btntype = FindViewById <Button>(Resource.Id.btntype); btntype.Click += OnClick; btnMarkersDemo.Click += btnMarkersDemo_Click; btnPolylineDemo.Click += btnPolylineDemo_Click; btnPolygonDemo.Click += btnPolygonDemo_Click; btnCircleDemo.Click += btnCircleDemo_Click; btnOverlayDemo.Click += btnOverlayDemo_Click; context = this; viewModel = new MainViewModel(); Bundle mapViewBundle = null; if (savedInstanceState != null) { mapViewBundle = savedInstanceState.GetBundle(MAPVIEW_BUNDLE_KEY); } mMapView.OnCreate(mapViewBundle); //get map instance RunOnUiThread(() => mMapView.GetMapAsync(this)); }
public override bool OnCreate() { AGConnectServicesConfig config = AGConnectServicesConfig.FromContext(Context); config.OverlayWith(new HmsLazyInputStream(Context)); return false; throw new NotImplementedException(); }