# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Ctors | Methods | Inherited Methods

# ServiceWorkerWebSettings

`public abstract class ServiceWorkerWebSettings`
`extends Object` ``

java.lang.Object
↳ | android.webkit.ServiceWorkerWebSettings

Manages settings state for all Service Workers. These settings are not tied to the lifetime of any WebView because service workers can outlive WebView instances. The settings are similar to `WebSettings` but only settings relevant to Service Workers are supported.

## Summary

### Public constructors
`ServiceWorkerWebSettings()`

### Public methods
`abstract boolean` | `getAllowContentAccess()` Gets whether Service Workers support content URL access.
`abstract boolean` | `getAllowFileAccess()` Gets whether Service Workers support file access.
`abstract boolean` | `getBlockNetworkLoads()` Gets whether Service Workers are prohibited from loading any resources from the network.
`abstract int` | `getCacheMode()` Gets the current setting for overriding the cache mode.
`abstract void` | `setAllowContentAccess(boolean allow)` Enables or disables content URL access from Service Workers, see `WebSettings#setAllowContentAccess`.
`abstract void` | `setAllowFileAccess(boolean allow)` Enables or disables file access within Service Workers, see `WebSettings#setAllowFileAccess`.
`abstract void` | `setBlockNetworkLoads(boolean flag)` Sets whether Service Workers should not load resources from the network, see `WebSettings#setBlockNetworkLoads`.
`abstract void` | `setCacheMode(int mode)` Overrides the way the cache is used, see `WebSettings#setCacheMode`.

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Public constructors

### ServiceWorkerWebSettings

    public ServiceWorkerWebSettings ()

## Public methods

### getAllowContentAccess

    public abstract boolean getAllowContentAccess ()

Gets whether Service Workers support content URL access.

Returns
`boolean` |

See also:

- `setAllowContentAccess(boolean)`

### getAllowFileAccess

    public abstract boolean getAllowFileAccess ()

Gets whether Service Workers support file access.

Returns
`boolean` |

See also:

- `setAllowFileAccess(boolean)`

### getBlockNetworkLoads

    public abstract boolean getBlockNetworkLoads ()

Gets whether Service Workers are prohibited from loading any resources from the network.

Returns
`boolean` | `true` if the Service Workers are not allowed to load any resources from the network

See also:

- `setBlockNetworkLoads(boolean)`

### getCacheMode

    public abstract int getCacheMode ()

Gets the current setting for overriding the cache mode.

Returns
`int` | the current setting for overriding the cache mode Value is `WebSettings.LOAD_DEFAULT`, `WebSettings.LOAD_NORMAL`, `WebSettings.LOAD_CACHE_ELSE_NETWORK`, `WebSettings.LOAD_NO_CACHE`, or `WebSettings.LOAD_CACHE_ONLY`

See also:

- `setCacheMode(int)`

### setAllowContentAccess

    public abstract void setAllowContentAccess (boolean allow)

Enables or disables content URL access from Service Workers, see `WebSettings#setAllowContentAccess`.

Parameters
`allow` | `boolean`

### setAllowFileAccess

    public abstract void setAllowFileAccess (boolean allow)

Enables or disables file access within Service Workers, see `WebSettings#setAllowFileAccess`.

Parameters
`allow` | `boolean`

### setBlockNetworkLoads

    public abstract void setBlockNetworkLoads (boolean flag)

Sets whether Service Workers should not load resources from the network, see `WebSettings#setBlockNetworkLoads`.

Parameters
`flag` | `boolean`: `true` means block network loads by the Service Workers

### setCacheMode

    public abstract void setCacheMode (int mode)

Overrides the way the cache is used, see `WebSettings#setCacheMode`.

Parameters
`mode` | `int`: the mode to use. One of `WebSettings#LOAD_DEFAULT`, `WebSettings#LOAD_CACHE_ELSE_NETWORK`, `WebSettings#LOAD_NO_CACHE` or `WebSettings#LOAD_CACHE_ONLY`. The default value is `WebSettings#LOAD_DEFAULT`. Value is `WebSettings.LOAD_DEFAULT`, `WebSettings.LOAD_NORMAL`, `WebSettings.LOAD_CACHE_ELSE_NETWORK`, `WebSettings.LOAD_NO_CACHE`, or `WebSettings.LOAD_CACHE_ONLY`

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*