Cheok Yan Cheng
Cheok Yan Cheng

Reputation: 42796

User Messaging Platform SDK : How to determine whether we are allowed to display Personalized Ads, or Non-personalized ads?

All the while, we are using deprecated Google Mobile Ads Consent SDK

Its ConsentStatus allow us to know, whether we should display Personalized Ads, or Non-personalized ads.

Please refer to the source code : https://github.com/googleads/googleads-consent-sdk-android/blob/main/consent-library/src/main/java/com/google/ads/consent/ConsentStatus.java

public enum ConsentStatus {
    @SerializedName("unknown")
    UNKNOWN,
    @SerializedName("non_personalized")
    NON_PERSONALIZED,
    @SerializedName("personalized")
    PERSONALIZED,
}

Google highly recommend us to migrate over User Messaging Platform SDK

However, we notice that there is no way to know, whether we are allowed to display Personalized Ads, or Non-personalized ads. The new ConsentStatus look as following.

public @interface ConsentStatus {
    int UNKNOWN = 0;
    int NOT_REQUIRED = 1;
    int REQUIRED = 2;
    int OBTAINED = 3;
}

enter image description here


May I know, if we are applying User Messaging Platform SDK, what kind of logic we should use, to determine whether we are allowed to display Personalized Ads, or Non-personalized ads?

Upvotes: 6

Views: 223

Answers (0)

Related Questions