← Sladu Network

📱 Mobile SDK v0.1 BETA

JS bundle for in-app WebViews and mobile sites. Supports banners, interstitials, and retargeting tracking.

🛠 Status: JS level is ready. Full native development (Android Java SDK, iOS Swift SDK) — on the roadmap. You can already embed it in any WebView/Cordova/Capacitor/React-Native apps via `WebView.loadUrl()` with our JS.

Quick start (any mobile platform with WebView)



Android (native bridge)

To let the SDK see the Google Advertising ID (for dedup and attribution), pass the bridge:

// MainActivity.java
WebView webView = findViewById(R.id.web);
webView.getSettings().setJavaScriptEnabled(true);

webView.addJavascriptInterface(new Object() {
    @android.webkit.JavascriptInterface
    public String getAdId() {
        return AdvertisingIdClient.getAdvertisingIdInfo(this).getId();
    }
    @android.webkit.JavascriptInterface
    public String getPlatform() { return "android"; }
}, "SladuBridge");

webView.loadUrl("https://your-page-with-sladu-script.com/");

iOS (Swift / WKWebView)

// ViewController.swift
import AdSupport
import AppTrackingTransparency

let userScript = WKUserScript(
    source: """
        window.SladuBridge = {
            getAdId: function() { return '\(ASIdentifierManager.shared().advertisingIdentifier)'; },
            getPlatform: function() { return 'ios'; }
        };
    """,
    injectionTime: .atDocumentStart,
    forMainFrameOnly: false
)
config.userContentController.addUserScript(userScript)

API

Sladu.showBanner(subid, opts)

subid— string, zone ID from /pub/zones.
opts.target— selector for where to insert (default: create at the end of body).

Sladu.showInterstitial(subid, opts)

opts.onClose()— callback on close.

Sladu.showRewardedVideo(subid, opts)

SOONVideo inventory coming soon.opts.onReward({granted, reason}).

Sladu.trackEvent(name, props)

Sends a conversion event. Used by the retargeting pixel to replenish audiences.

What is NOT supported in v0.1

Support

Telegram: @sladu_support · email: dev@sladu.net