The SOOMLA SDK
How it works?
Once the SOOMLA SDK is initialized, it automatically detects which ad networks' SDKs are integrated in the app. For each one of these Ad Networks' SDKs, the SOOMLA SDK knows exactly how to listen to all events and attributes it needs to collect in order to allow the SOOMLA Platform to work.
SOOMLA keeps improving it's SDKs and methods trying to make it as easy as possible on your R&D teams to integrate and operate its SDK. Each time an ad networks changes its SDK logic, SOOMLA also adapts to those changes so data collection will continue normally.
SDK Integration Steps:
(article: Creating a new App in Dashboard)
1. Import the SOOMLA SDK to your App:
SOOMLA supports both Gradle and manual download of the SDK.
Gradle
...
repositories {
maven {
url 'https://maven.soom.la/repo'
}
}
dependencies {
// SOOMLA
implementation 'com.soomla:android-agent:'
}
...
NOTE: If you're getting VerifyError from the SDK please make sure to use gradle plugin version 3.5.0.
For AndroidX with Jetifier enabled please exclude soomla by adding the following line to your configuration (please use gradle plugin version 3.5.0):
android.jetifier.blacklist=com.soomla*
If you are not planning on using gradle, please add the following line instead:
android.jetifier.blacklist=SoomlaTraceback*
Manual Download
Just download the SDK and import SoomlaTraceback-vx.x.x.aar and keeva-1.0.1.jar into your App.
Updated
Proguard:
If Soomla is integrated manually and Proguard is used to obfuscate your code for other ad networks, the following Proguard rules should be added to your proguard config:
-keep class com.soomla.traceback.** { *;}
-keep public class com.soomla.traceback.* { public *;}
-dontwarn com.soomla.traceback.**
# For AdColony integration
-keep class com.jirbo.adcolony.* { static *;}
#For AerServ integration
-keepclassmembers class com.aerserv.sdk.utils.UrlBuilder { static *;}
#For AmazonAps integration
-keep class com.amazon.device.ads.DtbThreadService {static *;}
#For AppLovin integration
-keepclassmembers class com.applovin.sdk.AppLovinSdk { static *;}
#For Facebook integration
-keepclassmembers class com.facebook.ads.internal.AdSdkVersion { static *;}
-keepclassmembers class com.facebook.ads.internal.settings.AdSdkVersion { static *;}
#For HyprMX integration
-keepclassmembers class com.hyprmx.android.sdk.utility.HyprMXProperties { static *;}
-keepclassmembers class com.hyprmx.android.BuildConfig { static *;}
#For Lifestreet integration
-keepclassmembers class com.lifestreet.android.lsmsdk.SlotController { static *;}
#For Millennialmedia integration
-keepclassmembers class com.millennialmedia.MMSDK { static *;}
#For Smaato integration
-keepclassmembers class com.smaato.soma.bannerutilities.constant.Values { static *;}
#For Verizon integration
-keepclassmembers class com.verizon.ads.edition.BuildConfig {static *;}
#For Vungle integration
-keepclassmembers class com.vungle.publisher.VunglePub { static *;}
# In case you use Kochava for Attribution
-keep class com.kochava.android.tracker.Tracker
-keep class com.kochava.android.tracker.InputParams
-keep class androidx.localbroadcastmanager.content.LocalBroadcastManager { *;}
-keep class androidx.recyclerview.widget.RecyclerView { *;}
-keep class androidx.recyclerview.widget.RecyclerView$OnScrollListener { *;}
-keep class android.support.v7.widget.RecyclerView { *;}
-keep class android.support.v7.widget.RecyclerView$OnScrollListener { *;}
-keep class android.support.v4.content.LocalBroadcastManager { *;}
-keep class com.android.internal.util.Predicate { *;}
2. Initializing the SDK:
Additionally, Soomla SDK should be initialized on the Main thread or on the same thread as other ad network SDKs.
Add the following to your app main Activity:
import com.soomla.traceback.SoomlaTraceback;
import com.soomla.traceback.SoomlaConfig;
...
protected void onCreate(Bundle savedInstanceState) {
// Get the appKey from the App's Settings page.
String appKey = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
// Initialize
SoomlaTraceback.getInstance().initialize(activity, appKey);
...
}
3. SDK Call-Back events
SoomlaSdkInitListener:
The listener will be called once Soomla SDK was successfully initialized.
Note: It usually takes a few seconds to initialize Soomla SDK (1~10 seconds) depending on the number of Ad Network SDKs used. Keep in mind, delays can also be caused by network connectivity issues.
SoomlaConfig.Builder builder = new SoomlaConfig.Builder() .setSoomlaSdkInitListener(new SoomlaSdkInitListener() { @Override public void onSuccess() { Log.d(TAG, "onSuccess"); } @Override public void onFailed(SoomlaSdkInitError error, String message) { Log.d(TAG, "onFailed " + error + " message: " + message); } }); SoomlaConfig soomlaConfig = builder.build(); SoomlaTraceback.getInstance().initialize(activity, appKey, soomlaConfig);
That's it!