Download

[FREE] AdColony, AppLovin, Chartboost, UnityAds, Vungle, Sharing, OneSignal, Facebook, Everyplay.

Hi everyone!

I would like to share few plugins i was working, for my mobile games, with the community.

Currently they are available only for Android, as i don’t have mac/iOS devices available for developing. When i will be able to get them i will release the iOS updates too, as i will use them anyway to my games.

The completed plugins so far are AdColony, AppLovin, Chartboost, UnityAds, Vungle, Sharing. Everyplay has some features working for now and OneSignal, Facebook,hopefully, will be completed the next days.

Now more specifically, AdColony, AppLovin, Chartboost, UnityAds, Vungle enable rewarded video ads from each network. Sharing plugin allows you to save a screenshot and then share it natively, for example using gmail or sms.

You can get the plugins from github:https://github.com/PandoraEntertainment

All the plugins were tested with 4.13.2 -4.14.1 version.

OneSignal will enable push notification with OneSignal and Local Notifications.

Facebook will enable basic login functionality, App Invite and Sharing photo functionality, using the sharing dialog. No application review required from facebook.

Hopefully i will have them ready too, the next days.

More detail instruction and some screenshots coming below:

  • AdColony

To configure the plugin you need to go to Project Settings->Plugins->AdColony-> App Id and enter your App ID from AdColony Dashboard.
For entering the Zone ID you need to edit AdColony_APL.xml by entering your Zone ID from AdColony Dashboard to:



final String zoneId = ""; //Replace with your ZoneID from AdColony Dashboard.


  • AppLovin
    To configure the plugin you need to edit AppLovin_APL.xml by entering your sdk key:


 <meta-data android:name="applovin.sdk.key"
android:value= ""/> <!--Replace with your SDK key-->


To start preloading ads you need to call the AppLovin Preload Rewarded Video node early on, and from there you need to call it again after an ad is shown, you can check if an ad is available at any time with the AppLovin Has Rewarded Video node.

  • Chartboost
    To configure the plugin you need to go to Project Settings->Plugins->Chartboost-> App Id and App Signature and enter your App ID and App Signature from Chartboost Dashboard.

To start preloading ads you need to call the Chartboost Cache Rewarded Video node early on, and from there autocacing is enabled by default, you can check if an ad is available at any time with the Chartboot Has Rewarded Video node.

  • UnityAds
    To configure the plugin you need to edit UnityAds_APL.xml by entering your Game ID and Zone ID from UnityAds Dashboard to:


private String gameId = ""; //Replace with your GameId from UnityAds Dashboard

private String rewardedVideoId = ""; //Replace with your ZoneId from UnityAds Dashboard


  • Vungle
    To configure the plugin you need to go to Project Settings->Plugins->Vungle-> App Id and enter your App ID from Vungle Dashboard.

  • Sharing
    No need for configuration here, you just use the Screenshot node with a filename like: MyScreenshot.png to save a screenshot.

Then to share the screenshot you use the Share Screenshot Text NODE.
You can specify the subject, the message, with something like “Check my new score. URL” where URL is a link to your website, app store page etc. , the Filename you used earlier and the App Name.
The App Name is the same as seen in your package name, for example com.mycompany.appname. After you use this node you will be prompt to select an application to share the screenshot/text, for example a mail client, sms etc.

If you don’t want to share a screenshot you can just use the Share Text Url node where you specify the Subject and the message.

A small update, all the above plugins are now configurable through Project Settings->Plugins within the editor, and tested with 4.14 version. No need to edit APL files.

Download the master branch for each Ad provider from: https://github.com/PandoraEntertainment

I might release them at the marketplace, i have sent Epic the appropriate files but still need confirmation from each Ad provider that they don’t have a problem with it.

I might not be able to release them.

OneSignal so far seems to work fine, i will add some more functionality and i will update the thread.


UPDATE 01/18/2017*** Facebook Plugin.

I uploaded the Facebook Plugin. It integrates some basic functionality for Facebook sdk. Currently supports only Android. Some of you might find it useful for your projects too.

You can get the plugin here: https://github.com/PandoraEntertainment/Facebook

To use the plugin you have to setup minimum SDK version at Android settings to 21 and NDK LEVEL API to android-23.

…\Documents\Unreal Projects\YourProject\Plugins\FacebookSDK\lib\Android\res\values, you have to open FacebookID.xml and and use your Facebook APP_ID from facebook dashboard:



<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="facebook_app_id"></string><!-- Replace with your Facebook APP_ID -->
</resources>


At FacebookSDK_APL file you have to add yoUR APP_ID at the following manifest additions:



 <!-- Replace with your Facebook APP_ID -->
     <provider android:authorities="com.facebook.app.FacebookContentProvider${APP_ID}"
          android:name="com.facebook.FacebookContentProvider"
          android:exported="true" />


and then at gameActivityClassAdditions section replace the strings with your applinkUrl and previewImageUrl.




String appLinkUrl = "";//Replace with your applinkUrl

String previewImageUrl = "";////Repplace with your previewImageUrl



Don’t forget to follow all the instructions at Facebook dashboard and complete all required information and settings.

Bellow are few images showing the blueprint nodes available:

In order to use the Login Events create an actor blueprint, add Facebook sdk component and add it to your level.

With the App Invite node you can invite your Facebook friends to your game.

With the share photo you can share a photo from your game. You need to specify the AppName, it is the same as what you have on your package name, com.yourcompany.yourgame and the name of the file. For example MyScreenshot.png

To get a screenshot i am using the Screenshot method at my sharing plugin:https://github.com/PandoraEntertainment/Sharing

If you want to target devices with minimum target sdk below 21 you can try using the facebook 4.10.1 aar, but i haven’t tested it with this version, I think i have fix some errors during packaging regarding the aar res files, but i abandoned and start working with 4018version of facebook sdk.

In the FacebookSDK_APL file:



 <AARImports>
    <insertValue value="repository $S(PluginDir)/../../ThirdParty/repository"/>
    <insertNewline/>
    <insert>com.facebook,Facebook,4.18.0</insert>
    <insertNewline/>
  </AARImports>

replace with:


 <AARImports>
    <insertValue value="repository $S(PluginDir)/../../ThirdParty/repository"/>
    <insertNewline/>
    <insert>com.facebook,Facebook,4.10.1</insert>
    <insertNewline/>
  </AARImports>



For those that will like to get profile images, friends lists, or have leaderboards, achievements i won’t integrate those from Facebook, but i can achieve this functionality already and with a much more flexibility, in my opinion, by using Playfab

By just getting the facebook access token, i can get info about user profile and their friends, download user profile picture and those of their friends etc.

I have created a thread in Android forums too: https://forums.unrealengine.com/showthread.php?134365-Plugin-FREE-Facebook-for-Android

UPDATE 01/26/2017 OneSignal Plugin.

I uploaded the OneSignal Plugin. It integrates some basic functionality for OneSignal sdk. Currently supports only Android. Some of you might find it useful for your projects too.

You can get the plugin here: https://github.com/PandoraEntertainment/OneSignal.

To use the Plugin, at OneSignal_APL file you have to add your app_id and package name:



<meta-data android:name="onesignal_app_id"
         android:value="" /><!--Please Provideyour app_id -->
       
	  <!-- TODO: Please update the Package Name below to yours! --> 
      <receiver
          android:name="com.onesignal.GcmBroadcastReceiver"
          android:permission="com.google.android.c2dm.permission.SEND" >
        <intent-filter>
          <action android:name="com.google.android.c2dm.intent.RECEIVE" />
          <category android:name="" /><!--Please update the Package Name --> 
        </intent-filter>
      </receiver>




and check OneSignal documentation:https://documentation.onesignal.com/docs/customize-notification-icons and change the files in the lib/Android/res folders accordingly to yours.

I’ve been asking for a native screenshot sharing plugin FOREVER. Or even a tutorial on how to do one, as I know the java portion of it isn’t complex at all. You’re my official hero of the year.

I noticed you have to specify quite a bit in the screenshot sharing. If you leave AppName empty does the user get to choose, or do you have to specify? Also, if specifying does it have to be as package name or shortname? EG: “Facebook” or “com.ocana…xxxxxxxxx”?

Hi Distul,

Yes i think i have seen a thread about it.

You have to specify the app name. For example com.ocana.appname, you have to use appname in the method.

I guess can make it parse the package name and get the appname in java so there is no need for this input but maybe in a feature update.

Please try it and send me any feedback. I will try to make it better with time.

I am working on something similar with Facebook too, a simple login with basic permissions, App Invites, and sharing screenshots from your game. The same functionality from above but for Facebook.

So you can share screenshots with high scores, achievements, unlocking characters etc.

Using package name make store sense as package name shouldn’t change but app title can change at any time. I haven’t tried it yet, but if you haven’t already I’d recommend pulling up generic sharing menu if app isn’t specified.

Eg: when a user clicks the share button on any app it pulls a list of apps they can share to. It’s a built in function in Android and behaves VERY similar to specifying an app. The code is out there somewhere, I’ll try to locate it for you later.

The appname is that of your game, for example, com.yourcompany.appname. It is required so the it can find the correct folder path where the screenshot is stored.

It doesn’t have anything to do with what application you will use to share the screenshot.

If you try to share, yes you will see a pop up list with all available applications, like email clients, sms etc.

Oh, I misunderstood you. Perfect then! I appreciate this, will be a good learning tool as well. Thank you!

It seems this isn’t working for me. Whenever I try to share it just says invalid image. I’m on Cyangenmod13. I’m finding the screenshot in the UE4Game folder but I’m thinking you’re expecting it in data/com…?

Here are all the methods I tried to share with:
023aec6108d9f732bf934cd20937ad2a6bdf389e.png

I’ve the same problem as @Distul.
I’m using android 6.0.1.
While sharing, I get info about incorrect file.
The screenshot is saved in Phone\UE4Game\androidAR\androidAR\Saved\Screenshots\Android location.
It would be great if You could give as some sample project with working example.
Here is my Blueprint:

For a package named com.yourcompany.yourgame the argument you will use in the sharing method, will be App Name = yourgame.

If the argument you used at the screenshot method was: Filename = yourscreenshot.png, then you will use the same argument at the sharing method: Filename = yourscreenshot.png

Try it and let me know how it went.

Moreinfinity could you please check your attachment, i cannot open it.

Hi! Here are screenshots again:
f708a37c73477bba0f24dc8c02f4a53fec56e272.png
ec787f47a5a696f2ff65d720081c1d6d6b288a91.png

EDIT: Removing delays ale leaving only Screenshot ShareScreenShotText doesn’t change anything

Just saw what was wrong. I forgot to change one hard-coded variable.

Go to …\Unreal Projects\YourPoject\Plugins\Sharing\Source\Sharing

open the Sharing_APL with a text editor and change the following code:



File picFile = new File(dirpath.getPath(), "UE4Game" +"/" + AppName + "/" + AppName + "/" + "Saved/Screenshots/Android" + "/" + "Game.png");

to

File picFile = new File(dirpath.getPath(), "UE4Game" +"/" + AppName + "/" + AppName + "/" + "Saved/Screenshots/Android" + "/" + Filename);


Package again your game.

Just tested to my device.

But i will appreciate if you test it again in different devices too, as i have a limited number of them.

Your setup at the screenshot seems correct.

It’s working like a charm right now. I had have to also change my project name (My project was called androidAR, but in android package, application was called HanzaAR).
I used Samsung Galaxy A5 with android 6.0.1 (SM-A500FU). I’ll run samo tests on other phones later and will post the results.

With new changes works on my Moto X 2014 as well.

Worth mentioning the app name is the project name as shown in the uproject file, not it’s compile name.

I found this really useful in renaming the project: Renaming a C++ project - UE4 AnswerHub

I have updated the Sharing plugin at https://github.com/PandoraEntertainment/Sharing.

I’ve done some tests. It’s working perfectly on every devices I’ve tested which are:
DEVICE (ANDROID VERSION)
Samsung A5 (6.0.1)
Samsung S3 (4.3)
ZTE Blade A452 (???)
Samsung S4 mini (5.0)
Huawei hero 7 (6.0)
Samsung S3 (5.0)
Samsung S4 mini (6.0.1 Cyanogen)

Thanks for the feedback.

Glad to hear it’s working.

I think i solved the packaging problems i had with aar files for the Facebook sdk.

I will try to integrate the same functionality for Facebook too.

Are there any settings being changed or plugins being disabled that could prevent the screenshot sharing from working? It was fine on my project until I disabled some unused plugins and changed some of the project settings. But the project saved folder hasn’t changed. The screenshot is being saved but the share menu isn’t coming up. I know previously with the incorrect path the share menu would come up but the picture would be invalid, so I doubt it’s a path issue. Tried on a Moto X 2014 and a LG G2.

I’ve tried deleting binaries for project and plugins without luck.

This shows up several times in the compile, seems normal.



UATHelper: Packaging (Android (All)): AndroidPlatform.CollectPluginDataPaths: AndroidPlugin: E:\Git\Hexalution-Private\Plugins\AdBox\Source\AdColony\AdColony_APL.xml
UATHelper: Packaging (Android (All)): AndroidPlatform.CollectPluginDataPaths: AndroidPlugin: E:\Git\Hexalution-Private\Plugins\Sharing\Source\Sharing\Sharing_APL.xml
UATHelper: Packaging (Android (All)): UnrealPluginLanguage..ctor: 
UATHelper: Packaging (Android (All)): UPL: E:/Git/Hexalution-Private/Plugins/AdBox/Source/AdColony/AdColony_APL.xml
UATHelper: Packaging (Android (All)): UnrealPluginLanguage..ctor: 
UATHelper: Packaging (Android (All)): UPL: E:/Git/Hexalution-Private/Plugins/Sharing/Source/Sharing/Sharing_APL.xml


This shows twice, seems normal:



LogPluginManager: Loaded Plugin Sharing, From E:/Git/Hexalution-Private/Plugins/Sharing/Sharing.uplugin


Try deleting intermediate, saved, build folders etc build again with visual studio and package.

Try it with only the sharing plugin to see if it works. So you can be sure it is not the android settings or plugins you have disabled.

Then if it is working add the AdBox plugin to see if there is some problem then.

I haven’t seen a problem until now and i was using the sharing plugin with all 5 ad plugins i made and few others too.

Issue still persist, here are the steps I took:

  • Deleted Intermediate, Saved, Build/Src folders, Binaries folders.
  • Deleted old plugin folders, downloaded again from your git.
  • Rebuilt VS solution files.
  • Cleaned VS solution, performed build on VS solution.
  • Opened editor and packaged for Android shipping.

I did not disable my AdBox plugin as that would require me to also remove a lot of code just to get the project to package. However, your sharing plugin has been working with AdBox in the past, and AdBox has not been changed so I doubt that’s the issue.

Do you have a version that debugs to logcat? I can get the logcat to you if so…
It must be something with the JNI call not being injected or not calling properly if the share menu isn’t even showing.