geolocationEnabled property
Sets whether Geolocation is enabled. The default is true
.
NOTE for Android native WebView: Please note that in order for the Geolocation API to be usable by a page in the WebView, the following requirements must be met:
- an application must have permission to access the device location, see Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION;
- an application must provide an implementation of the PlatformWebViewCreationParams.onGeolocationPermissionsShowPrompt callback to receive notifications that a page is requesting access to location via the JavaScript Geolocation API.
Officially Supported Platforms/Implementations:
- Android native WebView (Official API - WebSettings.setGeolocationEnabled)
Implementation
bool? geolocationEnabled;