# Google Cloud Recaptcha Enterprise V1 Client - Class AndroidKeySettings (2.3.1)

2.3.1 (latest) 2.3.0 2.2.1 2.1.3 2.0.1 1.17.2 1.16.1 1.15.0 1.14.0 1.13.0 1.12.2 1.8.0 1.7.0 1.6.0 1.5.2 1.4.2 1.3.2 1.2.6 Reference documentation and code samples for the Google Cloud Recaptcha Enterprise V1 Client class AndroidKeySettings.

Settings specific to keys that can be used by Android apps.

Generated from protobuf message `google.cloud.recaptchaenterprise.v1.AndroidKeySettings`

## Namespace

Google \\ Cloud \\ RecaptchaEnterprise \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ allow_all_package_names` | `bool` Optional. If set to true, allowed_package_names are not enforced. |
| `↳ allowed_package_names` | `string[]` Optional. Android package names of apps allowed to use the key. Example: 'com.companyname.appname' Each key supports a maximum of 250 package names. To use a key on more apps, set `allow_all_package_names` to true. When this is set, you are responsible for validating the package name by checking the `token_properties.android_package_name` field in each assessment response against your list of allowed package names. |
| `↳ support_non_google_app_store_distribution` | `bool` Optional. Set to true for keys that are used in an Android application that is available for download in app stores in addition to the Google Play Store. |

### getAllowAllPackageNames

Optional. If set to true, allowed_package_names are not enforced.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setAllowAllPackageNames

Optional. If set to true, allowed_package_names are not enforced.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAllowedPackageNames

Optional. Android package names of apps allowed to use the key.

Example: 'com.companyname.appname'
Each key supports a maximum of 250 package names. To use a key on more
apps, set `allow_all_package_names` to true. When this is set, you
are responsible for validating the package name by checking the
`token_properties.android_package_name` field in each assessment response
against your list of allowed package names.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setAllowedPackageNames

Optional. Android package names of apps allowed to use the key.

Example: 'com.companyname.appname'
Each key supports a maximum of 250 package names. To use a key on more
apps, set `allow_all_package_names` to true. When this is set, you
are responsible for validating the package name by checking the
`token_properties.android_package_name` field in each assessment response
against your list of allowed package names.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSupportNonGoogleAppStoreDistribution

Optional. Set to true for keys that are used in an Android application that
is available for download in app stores in addition to the Google Play
Store.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setSupportNonGoogleAppStoreDistribution

Optional. Set to true for keys that are used in an Android application that
is available for download in app stores in addition to the Google Play
Store.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |