# GeolocationPermissions.Callback

Added in[API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

# GeolocationPermissions.Callback

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/webkit/GeolocationPermissions.Callback "View this page in Kotlin")\|Java

`
public
static


interface
GeolocationPermissions.Callback
`  
`


`

|------------------------------------------------|
| android.webkit.GeolocationPermissions.Callback |

<br />

*** ** * ** ***

A callback interface used by the host application to set the Geolocation permission state for an origin.

## Summary

|                                                                                                                                                                 ### Public methods                                                                                                                                                                 ||
|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract void` | ` `[invoke](https://developer.android.com/reference/android/webkit/GeolocationPermissions.Callback#invoke(java.lang.String,%20boolean,%20boolean))`(`[String](https://developer.android.com/reference/java/lang/String)` origin, boolean allow, boolean retain) ` Sets the Geolocation permission state for the supplied origin. |

## Public methods

### invoke

Added in[API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public abstract void invoke (String origin, 
                boolean allow, 
                boolean retain)
```

Sets the Geolocation permission state for the supplied origin.

<br />

|                                                                 Parameters                                                                 ||
|----------|----------------------------------------------------------------------------------------------------------------------------------|
| `origin` | `String`: the origin for which permissions are set <br />                                                                        |
| `allow`  | `boolean`: whether or not the origin should be allowed to use the Geolocation API <br />                                         |
| `retain` | `boolean`: whether the permission should be retained beyond the lifetime of a page currently being displayed by a WebView <br /> |