Test your ads using the Admix Sandbox on Android devices using Unity
This is a quick, step by step guide that shows you how to build and run a Unity project using Admix for monetisation on Android.
By the end of this tutorial, you'll be able to run your Unity project on Android and see how your Admix ads are looking in our Sandbox mode. This mode lets you see how ads will appear in your game using pre-made placeholder ads, so is a great penultimate step to check that everything is working and looks great.
In this tutorial, we used the Admix SDK v1.8.5 and it should be applicable to our future versions too.
What you'll need for this tutorial:
Requirements | Description |
---|---|
An Admix Developer Platform Account | Settings needed - App Status: Sandbox; Placements Status: ON status: ON |
Android Device and Cable | The Android device must be connected to the computer during the Build and Run process |
Android SDK, NDK | Minimum Android version - 6, API level 23 |
Unity Test Project | Place any Admix banners that you want to the scene |
Admix SDK plugin | The latest plugin from Admix, check your version here |
The Unity Editor | Unity 2017.4.X, Unity 2018.4.X, Unity 2019.1.X, Unity 2019.2.X. |
Step-by-Step Guide
1. Prepare the Unity Project
In our case, we created a totally new project and called it “Testing Admix on Android“. We installed the Admix SDK plugin and added all kinds of Admix banners to the scene, but feel free to place what you need. The Admix SDK currently has 2 kinds of video banners and 6 image with different sizes.
For more information on how to get started with Admix - refer to this article: https://docs.admix.in/docs/getting-started/admix-quickstart.
2. Save your Admix placements
Simply save the scene AND save the ad placements that you added from the Admix plugin.
3. Enable Sandbox mode in the Admix Developer Platform
Once you save your placements, you have to enable Sandbox mode for your project in the Admix Developer platform.
After saving your placements, simply click “Finish setup” and it will redirect you to https://app.admix.in/myapps where you can switch the status for your project from 'OFF' to 'Sandbox'. It's as simple as that.
4. Check your Admix placements
With Admix you can turn OFF or turn ON each specific placement from the Developer Platform online. By default all newly added placements are active, but let’s double-check that.
5. Test Admix ads in the Unity Editor
Now, let’s go back to Unity and run your project to see if the Admix ads are working.
In our case, it worked right after we enabled Sandbox mode but keep in mind that it could take ~10 minutes for the placements to be activated after they are set up in Sandbox mode for the first time. This is also true for any newly added placements being tested in Sandbox for the first time, even when your app already has working placements.
6. Preparing to test on the Android device
Now we can prepare everything for testing on your Android device. The whole process is simple, but Admix requires a few things that you have to know about. Let’s take it step-by-step:
- Click 'File' - 'Build Settings'
- Choose 'Android' and click 'Switch Platform'
- Click 'Add Open Scenes'
- For Android Admix SDK supports OpenGLES2 and OpenGLES3 and Vulkan as Graphic API. Please refer to this for more information about what is supported by the Admix Graphics API.
- Then you can choose where you want to run your app in the 'Run Device' section.
- Attach your Android device using USB. Make sure that “USB debugging” is ON on your device.
- Click 'Refresh' and you should see your Android device on the list
- Before hitting the “Build and Run” button you have to set up a company and product name, and include them in a package name in order to avoid errors during the building process. Also, make sure that the chosen Minimum API level is supported by your Android device (Minimum Android 5.1 API level 22)