[Plugin] Chartboost

We needed to integrate the Chartboost SDK in a mobile game, so I created a plugin that does this and lets you use it in blueprints:

The SDK allows you to run most Chartboost functions, including the ability to show interstitial ads, rewarded video ads and their more apps page. It also includes an actor component that allows you to respond to callbacks from Chartboost.

It currently supports iOS, but I intend to add Android support soon. If anyone in the community wants to take a stab at that I’d really appreciate it.

Thank you very much for the efforts, I think it is a great plugin, specially the video reward easy control. Are you going to develop the android version? That would be awesome to me.

Thank you!!

Alo.

Thank you very much for this! It works perfect! Do you have any word on when you will be implementing Android support?

I don’t have a firm timeline for Android support but it will likely be before the end of the year. I open-sourced this plugin half-hoping that someone else would take on that task and submit it back as a pull-request. As such, you’re welcome to give it a try. :slight_smile:

I would love to give it a shot but i’m not really sure where to start. I know how to add all the necessary code to the GameActivity.java but i have no idea how to go about making the connection between there and the engine let alone show up in blueprints. My C++ is not the best java is where i’m comfortable. I attempted to tear your code down and rebuild it facing the java statements in the GameActivity but i was unsuccessful. If you know any resources where i can get a better grasp on how to build an android plugin i would love to dig into this some more.

Thank you for a great plugin! It works very well!

I also tried AdColony Plugin in your GitHub repository but I could not install it properly.
I copied AdColony repo to a subfolder in my project (…/Plugins/). iOS build is going well, but it seems that the Adcolony server does not receive my requests.
I call the “Ad Colony Configure” function with “App” and “Zone” ids for my app on begin play event. I try to use “Ad Colony Is Virtual Currency Reward Available” and “Ad COlony Play V4VCVideo” functions. The first always returns “false”, and the second has no effect.

Perhaps my project or plugin requires some additional settings?

thank you man. I need android version of the plugin. If you make the version it would be great step for me, thank you in advance.

Hey folks if there are those still interested in an Android version please check out the Android branch in the Chartboost plugin page
https://github.com/getsetgames/Chartboost/tree/android

I’ve started to make some head way on this and while it doesn’t merge directly with the master/iOS branch currently I have been able to get a Chartboost ad displaying on device.

Hi Robert,

I was looking at your plugin and tried to add some AdMob functionality for interstitials. I have done it by tweaking the engine code but i want to try it as a plugin and later add rewarded videos from AdColony and maybe AppLovin for android.
For some reason i always get an error regarding AndroidJNI.h file or jni.h

I downloaded the chartboost plugin with android support but i get the error: fatal error: ‘Android/AndroidJNI.h’ file not found

I use a simple blueprint project, i added one empty c++ class, i created a plugins folder on my project,copied your plugin, i generated visual studio solution and build the development editor - win64 solution. If i try to package for android i get the above error.

I am using 4.10.4 engine from launcher.

Any ideas what might causing it?

The Android support doesn’t work. It’s very early and it doesn’t even compile property. The JNI is also being used incorrectly. We forked it and got it working.

We also made it work as a project plugin (the original was hardcoded to copy the libraries from engine folders) However, we didn’t implement all functions yet (we only use rewarded video for now). You should be able to implement the others using the ones we implemented as a base. I’ll send GetSet a pull request too.

In our fork you need to set up your app ID and app signature in the project settings > plugins > chartboost. We couldn’t get the ChartBoostStart node to work on Android because it crashed the Chartboost library, so we had to initialize it during the game boot.

Hi there,

Thanks for the link. I will give it a try.

I see how you broadcast the event at the public native function. I was only calling UChartboostComponent:: DidCloseRewardedVideoDelegate.Broadcast(Location);

Hope it will work with admob too.

Hi yes I’ve encountered that error as well on my end there’s something missing from header search paths in the project settings or perhaps in the plugin code or project settings itself. I haven’t been able to track down the root issue currently but again this should be something to do with header search paths and referring to the proper location in the source structure for that header file. Internally I’ve been getting this to work by hard coding the full path to the “Android/AndroidJNI.h” header file which of course is not the correct solution but allowed me to progress with the task of getting Chartboost to work. So this is something still to be fixed.

Hi manoelneto I saw you’re pull request for the Changes to get Android work looks good thanks! There were a bunch of steps I hard coded when working on the Android version just to get to the core of displaying an interstitial in game. I haven’t had time since then that commit to clean things up but it seems you’ve done so which is great thank you. It’s not ideal but I wanted to share the investigation that I had completed since it took me several days even to get to the point of what is committed in the hopes it would help guide others. My next steps will be to review your pull request when I can set aside some time for this.

You’re welcome. Thanks you too for the groundwork, it was invaluable in learning how to create plugins with Android libraries. I didn’t know APL was a thing and still assumed modifying the engine’s GameActivity.java was necessary to add new libraries. It was thanks to your post I finally learned enough to put together a basic implementation of the Facebook online subsystem for Android with zero engine modifications all self-contained in a plugin (figuring out how to get an android library with resources to compile property was quite the challenge, however).

How do you install this plugin ? Im getting a error saying " missing file " and it won’t launch my game until i disable it.

My engine is 4.12.4

How do you install this plugin and build for IOS? Tried with github ue4 and launcher ue4 but it doesnt work.

How do you install this to build for IOS? I tried with both github ue4 and launcher ue4, but none compiles it due to c++. Tried with the plugin in the engine but still doesnt compile a non c++ project with this plugin.

you can use this plugin, very easy to use:
https://github.com/feixuwu/UnrealEngine4-EZ-Mobile-Ads