SDKBOX AdMob iOS working, Android not?

Guys

Compiles in Xcode and simulator/iPhone display banner ads.

Able to compile for Android and run using ‘cocos run’ on device but no (banner) ads. Also compiles in Android Studio and debugs on my phone but no (banner) ads.

I have double checked my AdMob unit IDs and sdkbox_config.json.

Any ideas please?

PS I am currently trying to get debugging working in Android Studio so I can find the issue but I am making little progress…

You have a class extends sdkbox::AdMobListener?

Is it always needed?

@chmyaf, yes I do have an AdMobListener class which logs the events (CCConsole::log)

Problem is that I am very new to Android Studio and quite new to Cocos2d-x and SDKBOX.

I do not know how to view log messages or debug application.

Most likely it’s a config issue. can you compare your project with the sample project?

@nite, Ok will download and take a look.

@nite

ok, checked the following line by line…

android.mk - all flags & libraries match. Example has line ‘$(call import-module,./prebuilt-mk)’ which mine does not - breaks my build.

Android.Manifest - all refs to android.gms included in mine. Permissions INTERNET & ACCESS_NETWORK_STATE also included. Missing refs to adcolony & chartboost but not using those.

Pattern of Usage - as my ads appear in iOS I guess the general pattern is Ok and cross checking my code with the sample shows no real difference. I simply cache all the ads explicitly after PluginAdMob::init() in applicationDidFinishLaunching().

I have double checked my AdMod android settings with my sdkbox_config.json and this looks ok, see below.

Not sure where to go from here? Any pointers appreciated!?

I have instrumented my code with log statement but, as yet, I am unable to debug the application.

Can you assist and point me to some suitable guides regards debugging both with/without android studio?

Does SDKBOX update automatically? Do I need to update??


|______ | \ |____/ |] | | _/
| |/ | _ |
] |____| _/ _
Copyright (c) 2016 SDKBOX Inc. v1.0.1.18

What is the output from adb logcat? And this banners show on default project with imported admob?

@chmyaf - unfortunately I am a newbie and I do not understand how to debug app or view adb logcat ouput. At the moment I am trying to understand Android studio and insert breakpoints… :confused:

Can you show me where to find guides or examples of debugging? Thanks

I’m too)

https://developer.android.com/studio/command-line/logcat.html

I agree with Nite, that is most likely a problem in the config.

Guys

It would appear to be my ‘pattern’ of usage. I was explicitly caching all my ads in 4 lines of code in my AppDelegate class. I would then try and PluginAdmob::show(‘AD_NAME’) in the appropriate place.

The SDKBOX plugin works fine under iOS this way. It does NOT work in the Android configuration. It would seem each ad requires caching individually before being displayed. An example pattern from the Cocos2d guys would be helpful maybe? :slight_smile: