Step 3: Integration


How to use AppConsent

1. Get your AppKey

The first step is to create your source / notice and retrieve your generated YOUR_APP_KEY from AppConsent : https://app.appconsent.ioarrow-up-right

2. Initialize AppConsent & use it

The second step is to initialize the SDK and wait for it to be started before using it.

circle-check

The idea is to be able to display the CMP as soon as possible, so that you can load your advertising supplier.

circle-info

INFO

Even if your ad provider registers with the user consent update events and this is transparent to you, some providers may not work correctly with this solution. For this reason, we recommend that you initialize your provider's SDK only when consent has been given, to ensure that your ads are in accordance with user consent. Think to update it each time the user updates his consent too, thank to callbacks

circle-info

INFO

In the example below, the code focuses on using the SDK exclusively. The potential imports and visual elements in these examples are therefore not present, as they are strongly linked to the Android structure and project, which are independent of the SDK.

Kotlin

Java

3. Suggest CMP to your users

It is also advisable to provide your users with an entry allowing them to view and modify their consent, such as a configuration screen.

circle-info

INFO

In the example below, the code focuses on using the SDK exclusively. The potential imports and visual elements in these examples are therefore not present, as they are strongly linked to the Android structure and project, which are independent of the SDK.

Kotlin

Java

circle-info

NOTE

Would you like a more complete example? We suggest you read the Go further page and take a look at the technical documentation.

Last updated