Admob UMP ConsentStatus Always Not_Required while testing

UMP ConsentStatus Always Not_Required when testing, and no consent form popup.

Several thing you need to take care:

  • Setup the Privacy Policy in Admob Console with your  app id included;
  • using following code to simulate Europe area;
Geography = DebugGeography.Eea;
  • pass device_hash_id with following code to set as a debug device.
new ConsentDebugSettings.Builder().addTestDeviceHashedId("device_hash_id");

This device_hash_id made me very confused at first. You could find such line of code in the Android Studio LogCat console. 

This id IS NOT advertiser id or device id, and it vary by Admob SDK versions. This means if you work with Admob SDK version 8.7.0, the device hash id you get is not the same as the version 10.0.0 with the same android device.

The device hash id used here vary by different SDK version. This take me a lots of time to fix why ConsentStatus Always Not_Required, and no consent form popup until i notice that the device_hash_id which works in version 10.0.0 is not the same as the one in version 8.7.0.

After go though all steps and fix the device hash id, the constent form popup. It’s work!

About device Ids

There are so many kinds of ids here. Such as device id, advertiser id, device hash id. They are different thing.  

  • Device id: use to identify a device uniquely. It is forbidden for some privacy reasons, and replaced with advertiser id. 
  • Advertiser id: use to deliver personalize ad to user.
  • Device Hash Id: some hash value calculated based on hash function and device information which used to uniquely identified a real device.

Sometimes we need some unique device id to figure out which user is which, and send back some personalize information. If we have a account system, that is fine. Otherwise we need to generate some unique id based on such mac address, or random generated UUID while the app was fist time launched.

That’s all!

ref: ump-consentstatus-always-notrequired-when-testing

留下评论

您的邮箱地址不会被公开。 必填项已用 * 标注