SDKBOX - Release with GDPR support

SDKBOX - Release with GDPR support

Public co-operation is best for everyone.

  1. no gameanalytics
  2. pm is ok.

sdkboxplay support GDPR?
iap support GDPR?

iap,sdkboxplay v2.4.3.9 support GDPR, it’s on staging server. will be released soon.

sdkbox import iap --staging

to gei it.

Thanks yinjimmy

Hi @yinjimmy,

iap is printing debug log even in release build.

06-14 01:04:54.505 11790 11805 D IAP : Refreshing products: 'full_game_no_ads,android.test.canceled,android.test.purchased,android.test.item_unavailable'

I also set debug to false (before and after init call) as below but it is still logging debug

sdkbox::IAP::setDebug(false); sdkbox::IAP::init();

Any idea?


It’s a bug here, I’m fixing currently.

Reading more about GDPR consent policy, user can change from targeted ads to npa.
But it doesnt look like admob plugin allow to change the gdpr flag once it is initialised.
So can the gdpr function be called after the init call?


yes, you can and check with output message:


Thanks @yinjimmy.

As I am currently writing up the privacy policy for my game, I need to provide details on the security measures taken by third party companies when storing data.

I really appreciate the efforts by SDKBOX team to commit to GDPR compliance but the privacy policy does not provide any details on data encryption or safe storage.

I assume that SDKBOX encrypts all data in transit? If so, would the privacy policy be updated to mention this?



If you have any questions or suggestions regarding this Privacy Policy, please contact us at

Thanks, (20190627)


  1. Misc: add keychain for iOS
  2. Misc: add SystemVersion for Android
  3. IAP: add generateIdentityVerificationSignature for iOS
  4. setGDPR: Some plugins invoke 3rd SDK (AdMob,Unity) api, some not yet.
    • PluginAdMob: AdMob & sdkbox-core
    • PluginUnity: Unity & sdkbox-core
    • PluginChartboost: Chartboost & sdkbox-core
    • PluginAdColony: sdkbox-core
    • PluginAgeCheq: sdkbox-core
    • PluginAppnext: sdkbox-core
    • PluginAppodeal: sdkbox-core
    • PluginApteligent: sdkbox-core
    • PluginBee7: sdkbox-core
    • PluginFacebook: sdkbox-core
    • PluginFirebaseAnalytics: sdkbox-core
    • PluginFlurryAnalytics: sdkbox-core
    • PluginFyber: sdkbox-core
    • PluginGoogleAnalytics: sdkbox-core
    • PluginGPG: sdkbox-core
    • PluginInMobi: sdkbox-core
    • IAP: sdkbox-core
    • PluginKochava: sdkbox-core
    • PluginLeadBolt: sdkbox-core
    • PluginMisc: sdkbox-core
    • PluginOneSignal: sdkbox-core
    • PluginPhunwareAds: sdkbox-core
    • PluginPhunwareMessaging: sdkbox-core
    • PluginSdkbox-coreAds: sdkbox-core
    • PluginSdkbox-corePlay: sdkbox-core
    • PluginShare: sdkbox-core
    • PluginTapcore: sdkbox-core
    • PluginTune: sdkbox-core
    • PluginValuePotion: sdkbox-core
    • PluginYoutube: sdkbox-core
  5. AdMob: output ad request extra argument for debug
  6. AdMob: auto cache failed AD by setAutoCacheDelay
  7. AdMob: support do not cache ad when init / AD closed by setAutoCache
  8. CMake: fix Lua/JS, gpg
  9. Support CMake when cocos >= 3.16
  10. Facebook: gameRequest api
  11. Facebook: onInviteFriendsWithInviteIdsResult return uids []
  12. Firebase: setScreenName api for Android
  13. Firebase: export constants to Lua
    • sdkbox.FB_PERM_READ_EMAIL
    • sdkbox.FBSDKLoginBehaviorNative
    • sdkbox.FBSDKLoginBehaviorBrowser
    • sdkbox.FBSDKLoginBehaviorSystemAccount
  14. export sdkbox api to JS/Lua
    • sdkbox::init
    • sdkbox::setConfig
    • sdkbox::getConfig


  1. Firebase update iOS SDK 6.2.0
  2. AdColony android 3.3.8
  3. play-services-ads android 17.2.0
  4. Facebook iOS SDK to V5
  5. AdMob iOS SDK 7.44.0


  1. Fixed SDKBoxPlay login: using getGoogleSignInOptions() not GoogleSignInOptions.DEFAULT_GAMES_SIGN_IN on Android
  2. Fixed Facebook iOS12 login
  3. Fixed AdMob smart banner for iOS
  4. Fixed share proguard
  5. Fixed sdkbox-core iOS memory leak
  6. Fixed IAP getPurchaseHistory
  7. Fixed AdMob banner position: on top when config bottom some iOS device.


Hello yinjimmy. I have an issue with latest update of SDKBox.
Amount of ANR’s (Application Not Responding) events considerably increased. I did a quick investigation and found that the cause of it is an automatic caching of ads by AdMob.

So I disabled auto caching by calling


Also I reworked my code to do caching of ads by calling sdkbox::PluginAdMob::cache() in a separate worker thread. ANR amount has been decreased but not eliminated completely. I still get ANR’s where ads caching blocks main thread.

“main” prio=5 tid=1 Blocked
| group=“main” sCount=1 dsCount=0 flags=1 obj=0x73e3a838 self=0xeabc8000
| sysTid=20427 nice=-10 cgrp=default sched=0/0 handle=0xeeacb494
| state=S schedstat=( 1415768472 170654662 3797 ) utm=96 stm=45 core=7 HZ=100
| stack=0xff516000-0xff518000 stackSize=8MB
| held mutexes=
at (

  • waiting to lock <0x0ae99f84> (a java.lang.Object) held by thread 65
    at (
    at android.os.Handler.handleCallback (
    at android.os.Handler.dispatchMessage (
    at aaj.a (
    at (
    at aaj.dispatchMessage (
    at android.os.Looper.loop (
    at (
    at java.lang.reflect.Method.invoke (
    at$ (
    at (

Can AdMob still do some caching on main thread even auto-caching is disabled? Or I’m missing something?

Is Google Mobile Ads do some caching by itself? How this can be tuned or changed to prevent such an ANR’s? Thanks.

I also have a lot of ANR’s of this kind:

“main” tid=1 Blocked
“main” prio=5 tid=1 Blocked
| group=“main” sCount=1 dsCount=0 flags=1 obj=0x74b48550 self=0xf2d48000
| sysTid=31146 nice=-10 cgrp=default sched=0/0 handle=0xf7208494
| state=S schedstat=( 1034146069 152396547 3010 ) utm=81 stm=22 core=2 HZ=100
| stack=0xff0dc000-0xff0de000 stackSize=8MB
| held mutexes=
at (

  • waiting to lock <0x0cb62f29> (a java.lang.Object) held by thread 108
    at (
    at (
    at aqh.a (
  • locked <0x0ea6c2ae> (a aqh)
    at (
    at aqh.a (
  • locked <0x0ce6184f> (a aqh)
    at (
    at (
  • locked <0x01d1875e> (a
    at (
    at (
    at pb.onTransact (
    at android.os.Binder.transact (
    at (
    at (
    at (
    at (
    at (
    at com.sdkbox.plugin.PluginAdMob.createOrGetBannerView (
    at com.sdkbox.plugin.PluginAdMob.access$200 (
    at com.sdkbox.plugin.PluginAdMob$ (
    at android.os.Handler.handleCallback (
    at android.os.Handler.dispatchMessage (
    at android.os.Looper.loop (
    at (
    at java.lang.reflect.Method.invoke (
    at$ (
    at (

And a bunch of ANR’s where next call appears:

com.sdkbox.plugin.PluginAdMob.nativeInit (

On screenshot I have marked update of my app. I’m only updated SDKBox plugins on that update.

First, thanks for your report this issue.

These code stop PluginAdMob auto cache ads.
I need to research AdMob whether do some auto-caching.


Most devices that have ANR issues are Huawei ones with android 7.0 or 9.0. Hope this helps.

Hi @yinjimmy, in continuation of ANR issues. I see that even when auto-caching is disabled by calling this function:

PluginAdMob still calls


function implicitly for each ad entry that defined in sdkbox_config.json file. I assume this behavior because adViewDidReceiveAd callback is always called for each ad even when autocaching is disabled.

Is it possible to fix this? Thanks.

Google will auto cache banner ad again.

Thanks for your answer. I’m talking about interstitial ads and rewarded videos. You are right about banner ads, I didn’t cache banners at all because of this.

When I used older versions of SDKBox ( for example) I didn’t receive any ads until calling PluginAdMob::cache() explicitly.
Now, when using latest version of SDKBox, I’m always receive ads at startup, and it is doesn’t matter is autocaching disabled or not. I even don’t need to call PluginAdMob::cache routine explicitly to get ads.

I want to get rid of this behavior because I don’t want to AdMob to cache ALL ads I have listed on sdkbox_config on game startup. I want to cache only that ads, that I need. This way I could reduce ANRs on some devices with slow internet. Also I don’t want AdMob to cache ads implicitly, for example for players that opted-out from ads.

let me check the admob plugin logic again.

plz invoke setAutoCache before init:


it’s never cache any admob ad.

I confirm.

Thanks @yinjimmy, it works.