protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);

            _fusedLocationProviderClientLastLocationListener?.Dispose();
            _fusedLocationProviderClientLastLocationListener = null;

            _fusedLocationProviderClient?.Dispose();
            _fusedLocationProviderClient = null;

            _circle?.Dispose();
            _circle = null;

            _latLng?.Dispose();
            _latLng = null;

            _marker?.Dispose();
            _marker = null;
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.activity_map);

            Android.Util.Log.Info(TAG, "IsHuaweiMobileServicesAvailable");

            if (HuaweiApiAvailability.Instance.IsHuaweiMobileServicesAvailable(this) != ConnectionResult.Success)
            {
                return;
            }

            Android.Util.Log.Info(TAG, "Before Init");

            // Initialise AGConnectServices here or in XamarinCustomProvider
            //var config = AGConnectServicesConfig.FromContext(ApplicationContext);
            //config.OverlayWith(new HmsLazyInputStream(this));
            //AGConnectInstance.Initialize(this);

            Android.Util.Log.Info(TAG, "After Init");

            FindViewById <ImageView>(Resource.Id.back_img).Click += (s, a) => Finish();

            // Initialise huawei fused location provider
            _fusedLocationProviderClientLastLocationListener = new LastLocationListener(
                location =>
            {
                switch (location)
                {
                case null:
                    GetLocation();
                    break;

                default:
                    MoveToUserLocation(new LatLng(location.Latitude, location.Longitude));
                    break;
                }
            },
                exception =>
            {
                Toast.MakeText(this, exception.Message, ToastLength.Long).Show();
            });

            Android.Util.Log.Info(TAG, "GetFusedLocationProviderClient");

            _fusedLocationProviderClient = LocationServices.GetFusedLocationProviderClient(this);

            Android.Util.Log.Info(TAG, "CheckPermission");

            // Get last known location if permissions are granted
            if (CheckPermission(Permissions, 100))
            {
                GetLastLocation();
            }

            // Initialise huawei map
            _mapView = FindViewById <MapView>(Resource.Id.mapview);
            Bundle mapViewBundle = null;

            if (savedInstanceState != null)
            {
                mapViewBundle = savedInstanceState.GetBundle(MapViewBundleKey);
            }

            Android.Util.Log.Info(TAG, "MapView.OnCreate");
            _mapView.OnCreate(mapViewBundle);

            RunOnUiThread(() =>
            {
                Android.Util.Log.Info(TAG, "MapView.GetMapAsync");
                _mapView.GetMapAsync(this);
            });
        }