# firebase::gma::ump::ConsentInfo


`#include <consent_info.h>`

Consent Information class for the User Messaging Platform SDK.

## Summary

The User Messaging Platform (UMP) SDK is Google's option to handle user privacy and consent in mobile apps.

This class contains all of the methods necessary for obtaining consent from the user.

**[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace.

| ### Constructors and Destructors ||
|---|---|
| `https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1ac8a3ab8553ff46d76ff884f58774368b()` Shut down the User Messaging Platform Consent SDK. ||

| ### Public functions ||
|---|---|
| `https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1ac93b00b1a72fe833cdeb2dc62762d8f2()` | `bool` **[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace. Indicates whether the app has completed the necessary steps for gathering updated user consent. |
| `https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1a7c81b3660a04a250c9854f5132105587()` | `https://developers.google.com/admob/cpp/reference/namespace/firebase/gma/ump#namespacefirebase_1_1gma_1_1ump_1a257886851ea6ac048f36cb87e623233d` **[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace. Consent form status. |
| `https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1a3644424528bd933f28043ce8c1af772a()` | `https://developers.google.com/admob/cpp/reference/namespace/firebase/gma/ump#namespacefirebase_1_1gma_1_1ump_1a9185ca551351378e3c99e2cd357979cf` **[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace. The user's consent status. |
| `https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1a0b4adb1cc65f3854b3b7473234f7ac36()` | `https://developers.google.com/admob/cpp/reference/namespace/firebase/gma/ump#namespacefirebase_1_1gma_1_1ump_1ad94746f2f3492e68b92738b9cf4cfb64` **[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace. Check whether the privacy options form needs to be displayed. |
| `https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1a126b42de2a781340bbd0345136fa56fb(https://developers.google.com/admob/cpp/reference/namespace/firebase/gma/ump#namespacefirebase_1_1gma_1_1ump_1a2aef33d9a1aa6bf80c70b40ef9c0268e parent)` | `https://developers.google.com/admob/cpp/reference/class/firebase/future#classfirebase_1_1_future< void >` **[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace. Loads a consent form and immediately presents it using the given FormParent, if ConsentStatus is kConsentStatusRequired. |
| `https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1a0021a4fb4266023de19a322ac1c2482f()` | `https://developers.google.com/admob/cpp/reference/class/firebase/future#classfirebase_1_1_future< void >` **[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace. Get the [Future](https://developers.google.com/admob/cpp/reference/class/firebase/future#classfirebase_1_1_future) from the most recent call to [LoadAndShowConsentFormIfRequired()](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1a126b42de2a781340bbd0345136fa56fb). |
| `https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1a2bbbe1d4d1c174901f4cd55a48b7d57b()` | `https://developers.google.com/admob/cpp/reference/class/firebase/future#classfirebase_1_1_future< void >` **[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace. Loads a consent form. |
| `https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1a21d515227440053359d7dbad86c10c82()` | `https://developers.google.com/admob/cpp/reference/class/firebase/future#classfirebase_1_1_future< void >` **[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace. Get the [Future](https://developers.google.com/admob/cpp/reference/class/firebase/future#classfirebase_1_1_future) from the most recent call to [LoadConsentForm()](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1a2bbbe1d4d1c174901f4cd55a48b7d57b). |
| `https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1aff1b2c4891eca23c058052b01c37290e(const https://developers.google.com/admob/cpp/reference/struct/firebase/gma/ump/consent-request-parameters#structfirebase_1_1gma_1_1ump_1_1_consent_request_parameters & params)` | `https://developers.google.com/admob/cpp/reference/class/firebase/future#classfirebase_1_1_future< void >` **[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace. Requests consent information update. |
| `https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1ad222e41a98233c241ce6952cb56ff41b()` | `https://developers.google.com/admob/cpp/reference/class/firebase/future#classfirebase_1_1_future< void >` **[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace. Get the [Future](https://developers.google.com/admob/cpp/reference/class/firebase/future#classfirebase_1_1_future) from the most recent call to [RequestConsentInfoUpdate()](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1aff1b2c4891eca23c058052b01c37290e). |
| `https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1ae8fe349b0e355bf26b324312b8bb9ac5()` | `void` **[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace. Clears all consent state from persistent storage. |
| `https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1a27453314485ba3a0665110affbd6b6d3(https://developers.google.com/admob/cpp/reference/namespace/firebase/gma/ump#namespacefirebase_1_1gma_1_1ump_1a2aef33d9a1aa6bf80c70b40ef9c0268e parent)` | `https://developers.google.com/admob/cpp/reference/class/firebase/future#classfirebase_1_1_future< void >` **[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace. Presents the full screen consent form using the given FormParent, which is defined as an Activity on Android and a UIViewController on iOS. |
| `https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1a4a1953380acee90f309714ff5d5b7a9e()` | `https://developers.google.com/admob/cpp/reference/class/firebase/future#classfirebase_1_1_future< void >` **[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace. Get the [Future](https://developers.google.com/admob/cpp/reference/class/firebase/future#classfirebase_1_1_future) from the most recent call to [ShowConsentForm()](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1a27453314485ba3a0665110affbd6b6d3). |
| `https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1afc5235054c8ecfadaa69a2d557a176db(https://developers.google.com/admob/cpp/reference/namespace/firebase/gma/ump#namespacefirebase_1_1gma_1_1ump_1a2aef33d9a1aa6bf80c70b40ef9c0268e parent)` | `https://developers.google.com/admob/cpp/reference/class/firebase/future#classfirebase_1_1_future< void >` **[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace. If [GetPrivacyOptionsRequirementStatus()](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1a0b4adb1cc65f3854b3b7473234f7ac36) is kPrivacyOptionsRequirementStatusRequired, presents a privacy options form from the provided FormParent, which is defined as an Activity on Android and a UIViewController on iOS. |
| `https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1a23171c10880f48b06414f7165453372a()` | `https://developers.google.com/admob/cpp/reference/class/firebase/future#classfirebase_1_1_future< void >` **[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace. Get the [Future](https://developers.google.com/admob/cpp/reference/class/firebase/future#classfirebase_1_1_future) from the most recent call to [ShowPrivacyOptionsForm()](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1afc5235054c8ecfadaa69a2d557a176db). |

| ### Public static functions ||
|---|---|
| `https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1abb2f929c7a0d6f0e04c10a7a05019a05(const ::https://developers.google.com/admob/cpp/reference/class/firebase/app#classfirebase_1_1_app & app, InitResult *init_result_out)` | `https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info *` **[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace. Initializes the User Messaging Platform Consent SDK. |
| `https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1ab1bd2842d0aa0925c986d8f072f22711(JNIEnv *jni_env, jobject activity, InitResult *init_result_out)` | `https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info *` Initializes the User Messaging Platform Consent SDK without Firebase for Android. |
| `https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1a5abca59ec96a2bc067b6e25f0366f85d(InitResult *init_result_out)` | `https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info *` **[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace. Initializes User Messaging Platform for iOS without Firebase. |

## Public functions

### CanRequestAds

```c++
bool CanRequestAds()
```
Indicates whether the app has completed the necessary steps for gathering updated user consent.

Returns true if [RequestConsentInfoUpdate()](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1aff1b2c4891eca23c058052b01c37290e) has been called and GetConsentStatus returns either kConsentStatusNotRequired or kConsentStatusObtained.

**[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace.

### GetConsentFormStatus

```c++
ConsentFormStatus GetConsentFormStatus()
```
Consent form status.

This value defaults to kConsentFormStatusUnknown and requires a call to [RequestConsentInfoUpdate()](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1aff1b2c4891eca23c058052b01c37290e) to update.

**[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace.

### GetConsentStatus

```c++
ConsentStatus GetConsentStatus()
```
The user's consent status.

This value defaults to kConsentStatusUnknown until [RequestConsentInfoUpdate()](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1aff1b2c4891eca23c058052b01c37290e) is called, and defaults to the previous session's value until [RequestConsentInfoUpdate()](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1aff1b2c4891eca23c058052b01c37290e) completes.

**[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace.

### GetPrivacyOptionsRequirementStatus

```c++
PrivacyOptionsRequirementStatus GetPrivacyOptionsRequirementStatus()
```
Check whether the privacy options form needs to be displayed.

This is updated by [RequestConsentInfoUpdate()](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1aff1b2c4891eca23c058052b01c37290e).

**[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace.

### LoadAndShowConsentFormIfRequired

```c++
Future< void > LoadAndShowConsentFormIfRequired(
  FormParent parent
)
```
Loads a consent form and immediately presents it using the given FormParent, if ConsentStatus is kConsentStatusRequired.

The FormParent is defined as an Activity on Android and a UIViewController on iOS. The [Future](https://developers.google.com/admob/cpp/reference/class/firebase/future#classfirebase_1_1_future) will be completed successfully after the user selects an option (and the form is dismissed), or if the form is not required. The [Future](https://developers.google.com/admob/cpp/reference/class/firebase/future#classfirebase_1_1_future) will be completed with an error if the form fails to load or show.

[GetConsentStatus()](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1a3644424528bd933f28043ce8c1af772a) and [CanRequestAds()](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1ac93b00b1a72fe833cdeb2dc62762d8f2) will be updated prior to the [Future](https://developers.google.com/admob/cpp/reference/class/firebase/future#classfirebase_1_1_future) being completed.

**[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace.
Details Parameters `parent` A FormParent, which is an Activity object on Android and a UIViewController object on iOS.

### LoadAndShowConsentFormIfRequiredLastResult

```c++
Future< void > LoadAndShowConsentFormIfRequiredLastResult()
```
Get the [Future](https://developers.google.com/admob/cpp/reference/class/firebase/future#classfirebase_1_1_future) from the most recent call to [LoadAndShowConsentFormIfRequired()](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1a126b42de2a781340bbd0345136fa56fb).

**[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace.

### LoadConsentForm

```c++
Future< void > LoadConsentForm()
```
Loads a consent form.

Returns an error if the consent form is unavailable or cannot be loaded.

**[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace.

### LoadConsentFormLastResult

```c++
Future< void > LoadConsentFormLastResult()
```
Get the [Future](https://developers.google.com/admob/cpp/reference/class/firebase/future#classfirebase_1_1_future) from the most recent call to [LoadConsentForm()](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1a2bbbe1d4d1c174901f4cd55a48b7d57b).

**[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace.

### RequestConsentInfoUpdate

```c++
Future< void > RequestConsentInfoUpdate(
  const ConsentRequestParameters & params
)
```
Requests consent information update.

Must be called in every app session before checking the user's consent status or loading a consent form. After calling this method, [GetConsentStatus()](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1a3644424528bd933f28043ce8c1af772a) and [CanRequestAds()](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1ac93b00b1a72fe833cdeb2dc62762d8f2) will be updated immediately to hold the consent state from the previous app session, if one exists. [GetConsentStatus()](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1a3644424528bd933f28043ce8c1af772a) and [CanRequestAds()](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1ac93b00b1a72fe833cdeb2dc62762d8f2) may be updated again immediately before the returned future is completed.

**[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace.

### RequestConsentInfoUpdateLastResult

```c++
Future< void > RequestConsentInfoUpdateLastResult()
```
Get the [Future](https://developers.google.com/admob/cpp/reference/class/firebase/future#classfirebase_1_1_future) from the most recent call to [RequestConsentInfoUpdate()](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1aff1b2c4891eca23c058052b01c37290e).

**[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace.

### Reset

```c++
void Reset()
```
Clears all consent state from persistent storage.

This can be used in development to simulate a new installation.

**[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace.

### ShowConsentForm

```c++
Future< void > ShowConsentForm(
  FormParent parent
)
```
Presents the full screen consent form using the given FormParent, which is defined as an Activity on Android and a UIViewController on iOS.

The form will be dismissed and the [Future](https://developers.google.com/admob/cpp/reference/class/firebase/future#classfirebase_1_1_future) will be completed after the user selects an option.

[GetConsentStatus()](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1a3644424528bd933f28043ce8c1af772a) and [CanRequestAds()](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1ac93b00b1a72fe833cdeb2dc62762d8f2) are updated when the returned [Future](https://developers.google.com/admob/cpp/reference/class/firebase/future#classfirebase_1_1_future) is completed.

<br />

> [!NOTE]
> **Note:** You must call [LoadConsentForm()](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1a2bbbe1d4d1c174901f4cd55a48b7d57b) and wait for it to complete before calling this method.

**[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace.

<br />

Details Parameters `parent` A FormParent, which is an Activity object on Android and a UIViewController object on iOS.

### ShowConsentFormLastResult

```c++
Future< void > ShowConsentFormLastResult()
```
Get the [Future](https://developers.google.com/admob/cpp/reference/class/firebase/future#classfirebase_1_1_future) from the most recent call to [ShowConsentForm()](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1a27453314485ba3a0665110affbd6b6d3).

**[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace.

### ShowPrivacyOptionsForm

```c++
Future< void > ShowPrivacyOptionsForm(
  FormParent parent
)
```
If [GetPrivacyOptionsRequirementStatus()](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1a0b4adb1cc65f3854b3b7473234f7ac36) is kPrivacyOptionsRequirementStatusRequired, presents a privacy options form from the provided FormParent, which is defined as an Activity on Android and a UIViewController on iOS.

This method should only be called in response to a user input to request a privacy options form to be shown.

The future completes when the user selects an option and dismisses the form or is completed immediately with an error code if no form is presented. The privacy options form is preloaded by the SDK automatically when a form becomes available. If no form has been preloaded, the SDK will try to load one asynchronously.

**[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace.
Details Parameters `parent` A FormParent, which is an Activity object on Android and a UIViewController object on iOS.

### ShowPrivacyOptionsFormLastResult

```c++
Future< void > ShowPrivacyOptionsFormLastResult()
```
Get the [Future](https://developers.google.com/admob/cpp/reference/class/firebase/future#classfirebase_1_1_future) from the most recent call to [ShowPrivacyOptionsForm()](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1afc5235054c8ecfadaa69a2d557a176db).

**[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace.

### \~ConsentInfo

```c++
 ~ConsentInfo()
```
Shut down the User Messaging Platform Consent SDK.

## Public static functions

### GetInstance

```c++
ConsentInfo * GetInstance(
  const ::firebase::App & app,
  InitResult *init_result_out
)
```
Initializes the User Messaging Platform Consent SDK.

**[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace.
Details Parameters `app` Any Firebase [App](https://developers.google.com/admob/cpp/reference/class/firebase/app#classfirebase_1_1_app) instance. `init_result_out` Optional: If provided, write the basic init result here. kInitResultSuccess if initialization succeeded, or kInitResultFailedMissingDependency on Android if there are Android dependencies missing. **Returns** A pointer to the [ConsentInfo](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info) instance if UMP was successfully initialized, nullptr otherwise. Each call to [GetInstance()](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1abb2f929c7a0d6f0e04c10a7a05019a05) will return the same pointer; when you are finished using the SDK, you can delete the pointer and the UMP SDK will shut down.

### GetInstance

```c++
ConsentInfo * GetInstance(
  JNIEnv *jni_env,
  jobject activity,
  InitResult *init_result_out
)
```
Initializes the User Messaging Platform Consent SDK without Firebase for Android.

The arguments to [GetInstance()](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1abb2f929c7a0d6f0e04c10a7a05019a05) are platform-specific so the caller must do something like this:

```c++
#if defined(__ANDROID__)
consent_info = firebase::gma::ump::ConsentInfo::GetInstance(jni_env,
activity);
#else
consent_info = firebase::gma::ump::GetInstance();
#endif
```

<br />

<br />

Details Parameters `jni_env` JNIEnv pointer. `activity` Activity used to start the application. `init_result_out` Optional: If provided, write the basic init result here. kInitResultSuccess if initialization succeeded, or kInitResultFailedMissingDependency on Android if there are Android dependencies missing. **Returns** A pointer to the [ConsentInfo](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info) instance if UMP was successfully initialized, nullptr otherwise. Each call to [GetInstance()](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1abb2f929c7a0d6f0e04c10a7a05019a05) will return the same pointer; when you are finished using the SDK, you can delete the pointer and the UMP SDK will shut down.

### GetInstance

```c++
ConsentInfo * GetInstance(
  InitResult *init_result_out
)
```
Initializes User Messaging Platform for iOS without Firebase.

<br />

> [!NOTE]
> **Note:** Once any overload of [ConsentInfo::GetInstance](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1abb2f929c7a0d6f0e04c10a7a05019a05) has been called, you can use this method to obtain the same instance again.

**[Deprecated.](https://developers.google.com/admob/cpp/reference/deprecated/deprecated)** This class has been moved to the [firebase::ump](https://developers.google.com/admob/cpp/reference/namespace/firebase/ump#namespacefirebase_1_1ump) namespace.

<br />

Details Parameters `init_result_out` Optional: If provided, write the basic init result here. kInitResultSuccess if initialization succeeded, or kInitResultFailedMissingDependency if a dependency is missing. On iOS, this will always return kInitResultSuccess, as missing dependencies would have caused a linker error at build time. **Returns** A pointer to the [ConsentInfo](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info) instance. Each call to [GetInstance()](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ump/consent-info#classfirebase_1_1gma_1_1ump_1_1_consent_info_1abb2f929c7a0d6f0e04c10a7a05019a05) will return the same pointer; when you are finished using the SDK, you can delete the pointer, and the UMP SDK will shut down.