
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
com.azerion.ads
Advanced tools
AzerionAds SDK has been designed to give developers options for showing Ads from ImproveDigital and AdMob.
default_azerion_sdk_config.json
from /Assets/Azerion/Ads/Editor/Configuration/[Android|iOS]
baseProjectTemplate.gradle
, mainTemplate.gradle
from /Assets/Plugins/Android
Unity -gvh_disable \
-batchmode \
-projectPath MyPluginProject \
-exportPackage Assets/Azerion Assets/Plugins/Android Assets/Plugins/iOS Assets/PlayServicesResolver Assets/ExternalDependencyManager release/AzerionAds-x.x.x.unitypackage \
-quit
For log output of above command
~/Library/Logs/Unity/Editor.log
You can also use the Console.app utility from your /Applications/Utilities folder to find the log file.
Here Unity
should point to the Unity install directory for
example /Applications/Unity/Hub/Editor/2020.3.3f1/Unity.app/Contents/MacOS/Unity
and MyPluginProject
should point
the Azerion Ads Unity plugin project root dir. After the command finish successfully unity package will be
in release(please create the release folder first in your local directory)
folder. Please make sure to replace x.x.x
with proper version number in AzerionAds-x.x.x.unitypackage
.
AzerionAds Unity package has a indirect dependency of EDM4U which need to be resolved using UPM. For that you need to
add google scoped registry in the
Edit -> Project Settings -> Package Manager -> Add Scoped Registry
Name: package.openupm.com
URL: https://package.openupm.com
Scope(s): com.google.external-dependency-manager
Assets-> Import Package -> Custom Package...
menuAzerionAds -> Configuration
menuAndroid
and iOS
After exporting the iOS Xcode project you need to add SKAdNetworkItems
key with SKAdNetworkIdentifier
values. For
google AdMob it is cstr6suwn9.skadnetwork
and you must have to add additional buyers identifier.
<key>SKAdNetworkItems</key>
<array>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>cstr6suwn9.skadnetwork</string>
</dict>
<array>
For dependency resolution we are using External Dependency Manager for Unity(EDM4U)
.
baseProjectTemplate.gradle
file in Assets/Plugins/Android
. If you don't have such a file, go
to Project Settings->Publishing Settings
and enable the baseProjectTemplate gradle option. allprojects {
...
repositories {
google()
jcenter()
flatDir {
dirs "${project(':unityLibrary').projectDir}/libs"
}
mavenCentral()
maven {
url "https://jitpack.io"
}
}
}
mainTemplate.gradle
. Go to Project Settings->Publishing Settings
and enable the mainTemplate gradle option.
Add the following dependenciesdependencies {
...
implementation 'com.azerion:azerion-sdk-ads-core:2.0.0'
implementation 'com.azerion:azerion-sdk-ads-mediation-admob:2.0.0'
implementation 'com.azerion:azerion-sdk-ads-unity-android-adapter:1.0.0'
...
**DEPS**}
Install cocoapods in your Mac using following command:
$ sudo gem install cocoapods
Enable cocoapods integration from
Assets --> External Dependency Management --> iOS Resolver --> Settings
Update the AzerionAdsDependencies.xml
file with required third party dependencies if needed.
At runtime SDK downloads the ad configuration for the app based on thePackage Name
. You can create a offline default
ad configuration file for the app via AzerionAds -> Configuration -> Android -> Create configuration
options. What it
does that behind the scene it download the current snapshot of the SDK config for this app from backend and create
the default_azerion_sdk_config.json
file in /Assets/Azerion/Ads/Editor/Configuration/Android
directory. Whenever SDK
failed to fetch the ad configuration from backend it will use the offline default ad config for ad serving.
public class AzerionAdsController : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
// Initialize the Azerion Ads SDK.
var settings = new Settings(withUserConsent:false, gdprConsentString:"", isCoppaCompliant:false, isTestModeEnabled:true, isDebugModeEnabled:true);
Debug.Log("Start Initializing the Azerion Ads SDK");
AzerionAds.Initialize(HandleInitCompleteAction, settings);
}
private void HandleInitCompleteAction(InitializationStatus initializationStatus)
{
// ImproveDigital, AdMob adapters status
foreach (KeyValuePair<string, AdapterStatus> adapterStateEntry in initializationStatus.getAdapterStatusMap())
{
Debug.Log("AdapterName: " + adapterStateEntry.Value.Name + " AdapterStatus: " +
adapterStateEntry.Value.InitializationState);
}
}
...
}
public class AzerionAdsController : MonoBehaviour
{
private BannerAd _bannerAd;
...
private void RequestBannerAd()
{
var adUnitId = "22358747";
_bannerAd?.Destroy();
// Create a Smart banner at bottom of the screen
_bannerAd = new BannerAd(adUnitId, AdSize.BANNER, AdPosition.Bottom);
// Add Event Handlers
_bannerAd.OnAdLoaded += (sender, args) =>
{
Debug.Log("Ad Loaded");
// Show the banner ad
_bannerAd?.Show();
};
_bannerAd.OnAdFailedToLoad += (sender, args) =>
{
Debug.Log("errorCode: " + args.ErrorCode + " message: " + args.Message + " errorContext: " +
args.ErrorContext);
};
_bannerAd.OnAdClosed += (sender, args) => { Debug.Log("OnAdClosed"); };
_bannerAd.OnAdDisplayed += (sender, args) => { Debug.Log("Ad Displayed"); };
_bannerAd.OnAdFailedToDisplay += (sender, args) =>
{
Debug.Log("errorCode: " + args.ErrorCode + " message: " + args.Message + " errorContext: " +
args.ErrorContext);
};
_bannerAd.OnAdHide += (sender, args) => { Debug.Log("OnAdHide"); };
_bannerAd.OnAdLeftApplication += (sender, args) => { Debug.Log("OnAdLeavingApplication"); };
// Load a banner ad
_bannerAd.LoadAd();
}
...
}
public class AzerionAdsController : MonoBehaviour
{
private InterstitialAd _interstitialAd;
...
private void RequestInterstitial()
{
if (_interstitialAd == null)
{
string adUnitId = "22371036";
_interstitialAd = new InterstitialAd(adUnitId);
// Add Event Handlers
_interstitialAd.OnAdLoaded += (sender, args) =>
{
Debug.Log("_interstitialAd Loaded");
};
_interstitialAd.OnAdFailedToLoad += (sender, args) =>
{
Debug.Log("errorCode: " + args.ErrorCode + " message: " + args.Message + " errorContext: " +
args.ErrorContext);
// If you want to load another ad
RequestInterstitial();
};
_interstitialAd.OnAdClosed += (sender, args) =>
{
Debug.Log("OnAdClosed");
// If you want to load another ad
RequestInterstitial();
};
_interstitialAd.OnAdDisplayed += (sender, args) =>
{
Debug.Log("Ad Displayed");
};
_interstitialAd.OnAdFailedToDisplay += (sender, args) =>
{
Debug.Log("errorCode: " + args.ErrorCode + " message: " + args.Message + " errorContext: " +
args.ErrorContext);
// If you want to load another ad
RequestInterstitial();
};
_interstitialAd.OnAdLeavingApplication += (sender, args) => { Debug.Log("OnAdLeavingApplication"); };
}
Debug.Log("Loading Interstitial Ad");
_interstitialAd.Load();
}
...
}
_interstitialAd?.Destroy();
_interstitialAd = null;
public class AzerionAdsController : MonoBehaviour
{
private RewardedAd _rewardedAd;
...
private void RequestRewardVideo()
{
string adUnityId = "22328044";
if (_rewardedAd == null)
{
_rewardedAd = new RewardedAd(adUnityId);
// Add Event Handlers
_rewardedAd.OnAdLoaded += (sender, args) =>
{
Debug.Log("Ad Loaded");
};
_rewardedAd.OnAdFailedToLoad += (sender, args) =>
{
Debug.Log("errorCode: " + args.ErrorCode + " message: " + args.Message + " errorContext: " +
args.ErrorContext);
// If you want to request another rewarded ad
RequestRewardVideo();
};
_rewardedAd.OnAdClosed += (sender, args) =>
{
Debug.Log("OnAdClosed");
// If you want to request another rewarded ad
RequestRewardVideo();
};
_rewardedAd.OnAdDisplayed += (sender, args) => {
Debug.Log("Ad Displayed");
};
_rewardedAd.OnAdFailedToDisplay += (sender, args) =>
{
Debug.Log("errorCode: " + args.ErrorCode + " message: " + args.Message + " errorContext: " +
args.ErrorContext);
// If you want to request another rewarded ad
RequestRewardVideo();
};
_rewardedAd.OnAdLeavingApplication += (sender, args) => { Debug.Log("OnAdLeavingApplication"); };
_rewardedAd.OnUserRewardEarned += (sender, args) =>
{
if (args != null)
{
Debug.Log("OnUserRewardEarned reward amount: " + args.Amount);
}
else
{
Debug.Log("OnUserRewardEarned");
}
OnUserRewardEarned(args);
};
}
_rewardedAd.Load();
}
...
}
_rewardedAd?.Destroy();
_rewardedAd = null;
If you use the following resolution and presentation
setting in your game then you may face the above problem, because
by default AdMob use Translucent
theme for it's AdActivity
which allow see through.
To solve this problem you have to override the Translucent
behaviour of the AdActivity
Here are the steps you need to follow
Add Custom Main Manifest
Override Translucent
behaviour of the AdActivity
<manifest package="com.unity3d.player" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
...
<application>
...
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
tools:replace="android:theme"/>
..
</application>
</manifest>
AAPT: error: resource android:attr/lStar not found.
To solve this issue add launcherTemplate.gradle
from Project Settings -> Publishing Settings -> Custom Launcher Gradle Template
Add the following configuration into launcherTemplate.gradle
...
configurations.all {
resolutionStrategy {
force 'androidx.core:core:1.6.0'
}
}
More than one file was found with OS independent path 'META-INF/annotation-experimental_release.kotlin_module'
Please add the following config into launcherTemplate.gradle
android {
...
packagingOptions {
exclude("META-INF/*.kotlin_module")
}
...
}
FAQs
AzerionAds SDK has been designed to give developers options for showing Ads from ImproveDigital, AdMob and AppLovin.
The npm package com.azerion.ads receives a total of 0 weekly downloads. As such, com.azerion.ads popularity was classified as not popular.
We found that com.azerion.ads demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.