IT. Expert System.

Android Reference

GeolocationPermissions


android.webkit

Class GeolocationPermissions



  • public class GeolocationPermissions
    extends Object
    This class is used to manage permissions for the WebView's Geolocation JavaScript API. Geolocation permissions are applied to an origin, which consists of the host, scheme and port of a URI. In order for web content to use the Geolocation API, permission must be granted for that content's origin. This class stores Geolocation permissions. An origin's permission state can be either allowed or denied. This class uses Strings to represent an origin. When an origin attempts to use the Geolocation API, but no permission state is currently set for that origin, WebChromeClient.onGeolocationPermissionsShowPrompt() is called. This allows the permission state to be set for that origin. The methods of this class can be used to modify and interrogate the stored Geolocation permissions at any time.
    • Constructor Detail

      • GeolocationPermissions

        public GeolocationPermissions()
        This class should not be instantiated directly, applications must only use getInstance() to obtain the instance. Note this constructor was erroneously public and published in SDK levels prior to 16, but applications using it would receive a non-functional instance of this class (there was no way to call createHandler() and createUIHandler(), so it would not work).
    • Method Detail

      • getOrigins

        public void getOrigins(ValueCallback<Set<String>> callback)
        Gets the set of origins for which Geolocation permissions are stored.
        Parameters:
        callback - a ValueCallback to receive the result of this request. This object's onReceiveValue() method will be invoked asynchronously with a set of Strings containing the origins for which Geolocation permissions are stored.
      • getAllowed

        public void getAllowed(String origin,
                      ValueCallback<Boolean> callback)
        Gets the Geolocation permission state for the specified origin.
        Parameters:
        origin - the origin for which Geolocation permission is requested
        callback - a ValueCallback to receive the result of this request. This object's onReceiveValue() method will be invoked asynchronously with a boolean indicating whether or not the origin can use the Geolocation API.
      • clear

        public void clear(String origin)
        Clears the Geolocation permission state for the specified origin.
        Parameters:
        origin - the origin for which Geolocation permissions are cleared
      • allow

        public void allow(String origin)
        Allows the specified origin to use the Geolocation API.
        Parameters:
        origin - the origin for which Geolocation API use is allowed
      • clearAll

        public void clearAll()
        Clears the Geolocation permission state for all origins.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 223 / 158855557. Delta: 0.03066 с