Floxis SDK API reference#
This page lists every public class, method, property and constant in the Floxis SDK for Android and iOS, grouped by artifact. Use it to look up a signature, a default or a threading rule. For setup steps, see the platform guides listed at the end of the page.
The SDK ships as binaries. Only the API on this page is supported. Anything in an internal package, and any class you
see in a stack trace that is not listed here, can change without notice.
Artifacts and availability#
| Artifact | Platform | Package | Status |
|---|---|---|---|
tech.floxis:floxis-sdk | Android, AdMob (play-services-ads) | com.floxis.sdk | Released (0.2.0) |
tech.floxis:floxis-sdk-nextgen | Android, Google Next-Gen Mobile Ads | com.floxis.sdk.nextgen | Released (0.2.0) |
tech.floxis:floxis-sdk-common | Android, shared runtime | com.floxis.sdk | Next release. Added for you by the other artifacts; never add it on its own |
tech.floxis:floxis-sdk-gam | Android, Google Ad Manager | com.floxis.sdk.gam | Next release |
tech.floxis:floxis-sdk-max | Android, AppLovin MAX | com.floxis.sdk.max | Next release |
tech.floxis:floxis-sdk-levelplay | Android, Unity LevelPlay | com.ironsource.adapters.custom.floxis | Next release |
FloxisSDK, FloxisSDKCore | iOS, AdMob | Swift modules | Not yet published |
Availability note. Artifacts marked "Next release" or "Not yet published" are available from the next release.
Contact your Floxis account manager for early access. Until then, their coordinates do not resolve from
maven.floxis.tech.
Members marked Next release below are not in 0.2.0. Everything else on the Android AdMob and Next-Gen artifacts is
in 0.2.0. In 0.2.0 the shared types (Floxis, FloxisConfig, AuctionOutcome and the rest) shipped inside
floxis-sdk and floxis-sdk-nextgen. From the next release they live in floxis-sdk-common, in the same
com.floxis.sdk package, so your imports and code do not change.
Each Android release on maven.floxis.tech also has a Javadoc jar next to the AAR. There is no sources jar.
Conventions#
Language and Java callers#
Android signatures are written in Kotlin. Every class works from Java:
- A parameter with a default value is optional in Kotlin. Java gets one overload per optional parameter, dropping them from the end. To set a later optional parameter from Java, pass every one before it.
Floxismethods and theloadmethods on full-screen classes are static in Java:Floxis.initialize(...),FloxisInterstitialAd.load(...).- Constants are static fields in Java:
FloxisConfig.DEFAULT_TIMEOUT_MS,FloxisShowError.EXPIRED. - Interfaces marked
fun interfacetake a Kotlin lambda or a Java lambda.
Errors#
- Bad arguments throw. Constructors and helpers that validate input throw
IllegalArgumentException. This coversFloxisConfig,FloxisSize,FloxisVideoOptions, every banner and GAM constructor, the MAX wrappers andFloxisPriceTiers. On iOS,FloxisConfiguration.initthrowsFloxisConfigurationError. - Auctions never throw. After construction, a failure inside a Floxis auction ends as
AuctionStatus.ERROR(orTIMEOUT), a warning is logged, and your ad server or mediation SDK still loads without Floxis.
Threads#
| Call or callback | Thread |
|---|---|
Android SDK methods (initialize, load, pause, resume, destroy, show, cancel) | Any thread. The auction and the ad load run on the main thread. |
FloxisInitListener, FloxisAuctionListener, FloxisLoadCallback, FloxisNextGenLoadCallback, FloxisNextGenBannerListener | Main thread |
Classic AdMob FullScreenContentCallback, OnUserEarnedRewardListener | As Google Mobile Ads delivers them (main thread) |
Next-Gen BannerAdEventCallback, InterstitialAdEventCallback, RewardedAdEventCallback, Next-Gen reward listener | Google's background thread. Post UI work to the main thread. |
| Prebid listeners on the GAM wrappers, MAX listeners | As Prebid or AppLovin deliver them |
iOS: Floxis, FloxisBannerAd, FloxisInterstitialAd, FloxisRewardedAd | @MainActor. Call from the main actor; completions run there. |
Placement IDs (configId / configID)#
configId is your name for the placement, for example home_banner. Floxis reports by placement, so give each placement
its own name and keep it the same across app versions. It is trimmed and sent as the impression's placement ID. It must
not be blank. On iOS it must be 1 to 128 characters.
R8 and ProGuard#
Each AAR ships its own consumer rules. You do not add any keep rules for Floxis. Release AARs are minified: public names are kept and everything else is renamed. Line numbers are kept, so your crash reports still show where a Floxis frame was.
Not part of the API#
- Classes named
BuildConfigin any Floxis package. UseFloxis.SDK_VERSION(Android) orFloxis.sdkVersion(iOS). - Anything under
com.floxis.sdk.internal,com.floxis.sdk.nextgen.internalorcom.floxis.sdk.levelplay.
Android: shared runtime#
Package com.floxis.sdk. These types come with floxis-sdk, floxis-sdk-nextgen, floxis-sdk-gam and
floxis-sdk-max. An app that combines several of these artifacts has one runtime: one Floxis.initialize call, with
one seat and region, configures all of them. floxis-sdk-levelplay does not use these types.
Floxis#
public object Floxis. The SDK entry point.
| Member | Description |
|---|---|
const val SDK_VERSION: String | The Floxis SDK version, for example "0.2.0". |
fun initialize(context: Context, config: FloxisConfig, listener: FloxisInitListener? = null) | Starts Floxis. See below. |
fun setEnabled(enabled: Boolean) | Kill switch at runtime. false skips every later auction (SKIPPED_DISABLED) and refuses to show a full-screen ad Floxis won but has not shown yet. true after an initialize with enabled = false starts Floxis then. |
fun isEnabled(): Boolean | The current kill-switch state. |
fun setPersonalizedAds(allowed: Boolean) | false skips every later auction (SKIPPED_NO_CONSENT) and adds npa=1 to the Google request each wrapper sends. Call it whenever consent changes. |
fun isInitialized(): Boolean | true once a config is set and the auction client is ready. |
fun auctionUrl(): String? | The auction URL for the current config, https://<region>.floxis.tech/pbm/openrtb2/auction?seat=<seat>, or null before initialize. |
initialize
- Call it once at start-up, after your consent tool has run. For AdMob and GAM, call it from the
MobileAds.initializecallback. - It is safe to call more than once and from any thread. A later call replaces the config used by later auctions.
listeneris always called, on the main thread, with the result.- With
config.enabled = falseit reportsDISABLEDand starts nothing. - If start-up fails, the next ad load retries it, at most once every 30 seconds. Until it succeeds, auctions are
SKIPPED_NOT_INITIALIZEDand your ads still load without Floxis. - Start-up gives up and reports
FAILEDafter 12 seconds without an answer.
MobileAds.initialize(this) {
Floxis.initialize(
applicationContext,
FloxisConfig(seat = "YOUR_SEAT", region = "us-e"),
) { status, description -> Log.d("Floxis", "init $status $description") }
}MobileAds.initialize(this, initializationStatus ->
Floxis.initialize(getApplicationContext(), new FloxisConfig("YOUR_SEAT", "us-e"),
(status, description) -> Log.d("Floxis", "init " + status + " " + description)));FloxisInitListener and FloxisInitStatus#
public fun interface FloxisInitListener {
public fun onInitialized(status: FloxisInitStatus, description: String?)
}FloxisInitStatus | Meaning |
|---|---|
SUCCEEDED | Ready. Auctions run on the next ad load. |
SERVER_STATUS_WARNING | Ready, but the start-up status check did not answer cleanly. Auctions still run. |
FAILED | Not ready. description says why. The next ad load retries, at most every 30 seconds. |
DISABLED | FloxisConfig.enabled was false. Nothing started. |
FloxisConfig#
public class FloxisConfig. Settings passed to Floxis.initialize. Every field is read-only after construction.
| Parameter, in order | Type | Default | Description |
|---|---|---|---|
seat | String | required | Your seat, from the endpoint's integration panel. 1 to 128 characters of A-Z a-z 0-9 . _ -. |
region | String | "us-e" | The auction region from the integration panel. A lowercase host label. |
timeoutMs | Int | 1500 | The longest the SDK waits for Floxis before your ad server loads without it. 200 to 10,000. |
debug | Boolean | false | Writes debug lines under the logcat tag Floxis and raises Prebid's log level. It never changes what is sent. Warnings are logged whatever this says. |
enabled | Boolean | true | Kill switch at start-up. Same as Floxis.setEnabled. |
personalizedAds | Boolean | true | Same as Floxis.setPersonalizedAds. |
testMode | Boolean | false | Marks auctions as test traffic. Takes effect only in a debuggable build. A release build ignores it and logs FLX-105. |
storeUrl | String? | null | The app's store URL. If null, the SDK uses Prebid's store URL, then the Google Play page for your package. Must not be blank. |
shareLocation | Boolean | true | Sends the device's last known location when the app already holds a location permission. Withheld for child-directed requests, when GDPR applies without consent to precise geolocation (TCF special feature 1), and after a US Privacy opt-out (from the next release, also a GPP US opt-out). The SDK never asks for a permission. |
The constructor throws IllegalArgumentException for a bad seat, region or timeout, or a blank storeUrl.
| Constant | Value |
|---|---|
FloxisConfig.DEFAULT_REGION | "us-e" |
FloxisConfig.DEFAULT_TIMEOUT_MS | 1500 |
FloxisConfig.MIN_TIMEOUT_MS | 200 |
FloxisConfig.MAX_TIMEOUT_MS | 10000 |
val config = FloxisConfig(
seat = "YOUR_SEAT",
region = "us-e",
timeoutMs = 1500,
debug = BuildConfig.DEBUG,
testMode = BuildConfig.DEBUG,
)From Java there is no builder: pass the parameters in order, for example
new FloxisConfig("YOUR_SEAT", "us-e", 1500, true, true, true, true) for seat, region, timeout, debug, enabled,
personalizedAds and testMode.
FloxisSize#
public data class FloxisSize(val width: Int, val height: Int). An ad size in dp. Both values must be positive, or
the constructor throws.
AuctionOutcome, AuctionStatus and FloxisAuctionListener#
AuctionOutcome describes one Floxis auction. You receive it; you never create it.
| Property | Type | Description |
|---|---|---|
status | AuctionStatus | What happened. |
priceBucket | String? | The winning price tier, for example "1.20". This is the hb_pb value your ad server matches. Set only on BID. |
latencyMs | Long | Time from auction start to result. 0 when the auction was skipped. |
detail | String? | Why there was no bid or an error, for example no response within 1500ms. |
responseId | String? | The exchange's bid response ID. Set only on BID. Quote it to support for one auction. |
AuctionStatus | Meaning |
|---|---|
BID | Floxis bid. The ad server request carries the price tier. |
NO_BID | No usable bid. detail may give a reason, including a declined rewarded video (see FLX-204). |
TIMEOUT | No answer within timeoutMs. |
ERROR | The auction failed. detail has the reason. |
SKIPPED_DISABLED | The kill switch is on. |
SKIPPED_NO_CONSENT | Personalised ads are off. |
SKIPPED_NOT_INITIALIZED | Floxis.initialize has not been called or has not finished. |
In every case your ad server or mediation SDK still loads. An auction BID does not prove an impression: the ad server
still chooses the winner.
public fun interface FloxisAuctionListener {
public fun onAuctionComplete(outcome: AuctionOutcome)
}Called on the main thread after each auction, once the ad server request has been sent.
FloxisLoadHandle#
public fun interface FloxisLoadHandle {
public fun cancel()
}Returned by full-screen load calls. cancel() drops the pending load: no callback fires afterwards. On Next-Gen, an ad
that loads after cancel() is destroyed for you.
FloxisShowResult and FloxisShowError#
show on the AdMob and Next-Gen full-screen classes returns a FloxisShowResult.
FloxisShowResult | Meaning | Error code |
|---|---|---|
SHOWN | The ad is being presented. | 0 |
ALREADY_SHOWN | This ad was already shown. Load a new one. | FloxisShowError.ALREADY_SHOWN = 1 |
DESTROYED | destroy() was called on this ad. | FloxisShowError.DESTROYED = 2 |
EXPIRED | Floxis won, but its bid expired before show. Load a new one. | FloxisShowError.EXPIRED = 3 |
DISABLED | Floxis won, but the kill switch was turned on before show. | FloxisShowError.DISABLED = 4 |
EXPIRED and DISABLED apply only when Floxis won the slot. An ad from another source shows as usual.
A refused show also reaches your show-failure callback, so code that reloads from there keeps working. The error's
domain is FloxisShowError.DOMAIN ("com.floxis.sdk"), its code is the value above, and its message is
Floxis refused to show the ad: <RESULT>. On classic AdMob it is the AdError passed to
onAdFailedToShowFullScreenContent. On Next-Gen it is a FullScreenContentError with code INTERNAL_ERROR whose
cause is a MediationAdError with that domain and code.
FloxisShowError.codeFor(result: FloxisShowResult): Int maps a result to its code.
FloxisInterstitialFormat, FloxisInterstitialOptions and FloxisVideoOptions#
FloxisInterstitialFormat | Meaning |
|---|---|
DISPLAY | Display only, at 320x480, 480x320, 768x1024 or 1024x768. |
VIDEO | Video only. |
DISPLAY_AND_VIDEO | Display and video bid on one impression and the higher bid wins. The default. |
public class FloxisInterstitialOptions(
public val format: FloxisInterstitialFormat = FloxisInterstitialFormat.DISPLAY_AND_VIDEO,
minWidthPercent: Int? = null,
minHeightPercent: Int? = null,
public val video: FloxisVideoOptions = FloxisVideoOptions(),
)minWidthPercentandminHeightPercentset the smallest display creative as a share of the screen. They are clamped to 0..100 and sent only when both are set. Read them back with the properties of the same names.videoapplies whenformatincludes video.
public class FloxisVideoOptions(
public val minDurationSeconds: Int? = null,
public val maxDurationSeconds: Int? = null,
public val skippable: Boolean? = null,
)- Leave a field
nullto let buyers choose, which keeps the most video demand. - Durations must be positive, and
minDurationSecondsmust not exceedmaxDurationSeconds, or the constructor throws. skippable = trueasks for skippable creatives only;falseasks for non-skippable only.
val options = FloxisInterstitialOptions(
format = FloxisInterstitialFormat.VIDEO,
video = FloxisVideoOptions(maxDurationSeconds = 30),
)FloxisPriceTiers#
public object FloxisPriceTiers. Helpers for the price tiers in your AdMob setup sheet. You only need them if you build
Custom Events or reports yourself.
| Member | Description |
|---|---|
const val INCREMENT: String | "0.10", the step of the default ladder. |
const val CAP: String | "20.00", the top of the default ladder. |
fun mediumTiers(): List<String> | The default ladder: "0.10", "0.20", … "20.00" (200 tiers). |
fun bucketFor(cpm: Double, tiers: List<String>? = null): String | The tier a price falls into. |
fun customEventParameter(bucket: String, tiers: List<String>? = null): String | The AdMob Custom Event parameter for a tier, {"hb_pb":"<bucket>"}. |
- With
tiersnullor empty,bucketForuses the default ladder: the price is truncated to a 0.10 step and capped at 20.00, so1.27gives"1.20"and35.0gives"20.00". - With your endpoint's own tiers,
bucketForreturns the highest tier at or below the price:bucketFor(1.25, listOf("1.00", "1.25", "25.00"))is"1.25". - Below the lowest tier,
bucketForreturns"0.00", which is not a Custom Event. customEventParameterthrows ifbucketis not exactly one of the tiers.- A tier list must have at most 500 tiers, each 0.01 to 999.99 with up to two decimals, in strictly ascending order.
Otherwise both methods throw. Tiers are written with two decimals, so
"1.5"becomes"1.50".
Android: AdMob (floxis-sdk)#
Package com.floxis.sdk. Built on com.google.android.gms:play-services-ads 25.5.0, Prebid Mobile 3.4.0 and Prebid's
AdMob adapters 3.4.0, which Gradle adds for you. Minimum Android SDK 24; your app compiles against API 35. Cannot share
an app with floxis-sdk-nextgen.
FloxisRequestFactory#
public fun interface FloxisRequestFactory {
public fun newBuilder(): AdRequest.Builder
// companion: @JvmField val DEFAULT: FloxisRequestFactory
}Returns a fresh AdRequest.Builder for every AdMob load, so you can add your own targeting. DEFAULT returns
AdRequest.Builder(). Floxis adds its adapter extras to the builder you return. When personalised ads are off it also
adds an AdMobAdapter extras bundle holding only npa=1, which replaces any AdMobAdapter extras bundle you added.
banner.load { AdRequest.Builder().setContentUrl("https://example.com/article") }FloxisLoadCallback#
public interface FloxisLoadCallback<T> {
public fun onAdLoaded(ad: T)
public fun onAdFailedToLoad(error: LoadAdError, auction: AuctionOutcome)
}Called on the main thread. onAdFailedToLoad fires when AdMob fails to load, including an ordinary AdMob no-fill.
auction says what Floxis did for that load.
FloxisBannerAd#
Runs a fresh Floxis auction before every AdMob banner load and owns refresh. Turn off automatic refresh on the AdMob ad unit.
public class FloxisBannerAd(
adView: AdView,
configId: String,
sizes: List<FloxisSize>,
refreshIntervalSeconds: Int = DEFAULT_REFRESH_SECONDS,
listener: FloxisAuctionListener? = null,
)| Parameter | Description |
|---|---|
adView | Your com.google.android.gms.ads.AdView, with its ad unit ID and size already set. |
configId | Placement name. Must not be blank. |
sizes | Sizes Floxis may bid. The first is the main size. Must not be empty. |
refreshIntervalSeconds | 60 by default. 0 or less turns refresh off. Other values are clamped to 30..120. |
listener | Called after each auction, refreshes included. |
| Member | Description |
|---|---|
val gpid: String | The placement ID sent with the auction (the trimmed configId). |
fun load(requestFactory: FloxisRequestFactory = FloxisRequestFactory.DEFAULT) | Runs an auction, then loads the AdView. Later refreshes reuse requestFactory. |
fun pause() / fun resume() | Stops and restarts refresh. They do not touch the AdView; call adView.pause() and adView.resume() too. |
fun destroy() | Stops refresh and drops pending work. Call adView.destroy() too. |
const val DEFAULT_REFRESH_SECONDS: Int | 60 |
Refresh runs only while the app is in the foreground, the screen is on, and at least half of the banner is visible. Otherwise it waits for the next interval. It pauses while the view is detached from the window, and the banner destroys itself when the activity or fragment that holds it is destroyed.
val banner = FloxisBannerAd(adView, "home_banner", listOf(FloxisSize(320, 50)))
banner.load()
override fun onPause() { banner.pause(); adView.pause(); super.onPause() }
override fun onResume() { super.onResume(); adView.resume(); banner.resume() }
override fun onDestroy() { banner.destroy(); adView.destroy(); super.onDestroy() }FloxisInterstitialAd#
| Member | Description |
|---|---|
val ad: InterstitialAd | The loaded Google ad. Use it for responseInfo and other Google properties. Show it through show, not directly. |
val auction: AuctionOutcome | The Floxis auction for this load. |
val isFloxisWinner: Boolean | true when the Floxis Custom Event served this ad. |
fun show(activity: Activity, contentCallback: FullScreenContentCallback? = null): FloxisShowResult | Shows the ad once. contentCallback is installed on the ad before it shows. |
fun destroy() | Marks the ad destroyed and removes its callback. A later show returns DESTROYED. |
companion fun load(context, adMobAdUnitId, configId, callback, options, requestFactory): FloxisLoadHandle | Runs an auction, then loads the AdMob interstitial. |
load parameters, in order:
| Parameter | Type | Default |
|---|---|---|
context | Context | required |
adMobAdUnitId | String | required |
configId | String | required |
callback | FloxisLoadCallback<FloxisInterstitialAd> | required |
options | FloxisInterstitialOptions | FloxisInterstitialOptions() |
requestFactory | FloxisRequestFactory | FloxisRequestFactory.DEFAULT |
var interstitial: FloxisInterstitialAd? = null
FloxisInterstitialAd.load(
context = this,
adMobAdUnitId = "ca-app-pub-XXXX/INTERSTITIAL",
configId = "level_end_interstitial",
callback = object : FloxisLoadCallback<FloxisInterstitialAd> {
override fun onAdLoaded(ad: FloxisInterstitialAd) { interstitial = ad }
override fun onAdFailedToLoad(error: LoadAdError, auction: AuctionOutcome) { }
},
)
when (interstitial?.show(this)) {
FloxisShowResult.EXPIRED, FloxisShowResult.DISABLED -> reloadInterstitial()
else -> Unit
}FloxisRewardedAd#
| Member | Description |
|---|---|
val ad: RewardedAd | The loaded Google ad. |
val auction: AuctionOutcome | The Floxis auction for this load. |
val isFloxisWinner: Boolean | true when the Floxis Custom Event served this ad. |
fun show(activity: Activity, onUserEarnedReward: OnUserEarnedRewardListener, contentCallback: FullScreenContentCallback? = null): FloxisShowResult | Shows the ad once. Grant the reward only from onUserEarnedReward. |
fun destroy() | Marks the ad destroyed and removes its callback. |
companion fun load(context, adMobAdUnitId, configId, callback, requestFactory, videoOptions): FloxisLoadHandle | Runs a video auction, then loads the AdMob rewarded ad. |
load parameters, in order: context: Context, adMobAdUnitId: String, configId: String,
callback: FloxisLoadCallback<FloxisRewardedAd>, requestFactory: FloxisRequestFactory = FloxisRequestFactory.DEFAULT,
videoOptions: FloxisVideoOptions = FloxisVideoOptions().
The order differs from the interstitial: requestFactory comes before the options. From Java, pass
FloxisRequestFactory.DEFAULT to reach videoOptions.
Rewarded is video only. A rewarded video bid with neither a click-through nor an end card is declined: the auction ends
NO_BID and FLX-204 is logged.
FloxisRewardedAd.load(this, "ca-app-pub-XXXX/REWARDED", "rewarded_main", callback)
rewarded?.show(this, { reward -> grant(reward) })FloxisRewardedAd.load(this, "ca-app-pub-XXXX/REWARDED", "rewarded_main", callback,
FloxisRequestFactory.DEFAULT, new FloxisVideoOptions(null, 30));Android: Next-Gen (floxis-sdk-nextgen)#
Package com.floxis.sdk.nextgen, plus the shared types in com.floxis.sdk. Built on
com.google.android.libraries.ads.mobile.sdk:ads-mobile-sdk 1.5.0. Minimum Android SDK 24; compileSdk 35. Cannot share
an app with floxis-sdk or floxis-sdk-gam.
Pass Next-Gen's MobileAds.initialize an Activity, or call it from Application.onCreate. Then call
Floxis.initialize on the main thread.
FloxisNextGenRequestCustomizer#
public fun interface FloxisNextGenRequestCustomizer {
public fun customize(builder: BaseAdRequestBuilder<*>)
// companion: @JvmField val NONE: FloxisNextGenRequestCustomizer
}Adds your own targeting to each Next-Gen request. It receives a fresh builder already bound to the ad unit ID (and size,
for banners). Floxis then sets its adapter extras. When personalised ads are off it also replaces the Google extras
bundle with one holding only npa = 1. NONE changes nothing.
FloxisNextGenLoadCallback#
public interface FloxisNextGenLoadCallback<T> {
public fun onAdLoaded(ad: T)
public fun onAdFailedToLoad(error: LoadAdError, auction: AuctionOutcome)
}LoadAdError is com.google.android.libraries.ads.mobile.sdk.common.LoadAdError. Called on the main thread, unlike raw
Next-Gen load callbacks.
FloxisNextGenBannerListener#
public interface FloxisNextGenBannerListener {
public fun onBannerLoaded(ad: BannerAd)
public fun onBannerFailedToLoad(error: LoadAdError, auction: AuctionOutcome)
}Called on the main thread after every banner load, refreshes included.
FloxisNextGenBannerAd#
public class FloxisNextGenBannerAd(
adView: AdView,
adMobAdUnitId: String,
adSize: AdSize,
configId: String,
sizes: List<FloxisSize>,
refreshIntervalSeconds: Int = DEFAULT_REFRESH_SECONDS,
listener: FloxisAuctionListener? = null,
loadListener: FloxisNextGenBannerListener? = null,
eventCallback: BannerAdEventCallback? = null,
)| Parameter | Description |
|---|---|
adView | Your Next-Gen AdView (com.google.android.libraries.ads.mobile.sdk.banner.AdView). |
adMobAdUnitId, adSize | The AdMob ad unit and size. Next-Gen takes them on the request, so pass them here, not on the view. adMobAdUnitId must not be blank. |
configId, sizes, refreshIntervalSeconds, listener | As for FloxisBannerAd. |
loadListener | Called after each Google load result. |
eventCallback | Installed on every loaded BannerAd before loadListener runs, so the first impression is never missed. Its events arrive on Google's background thread. |
| Member | Description |
|---|---|
val gpid: String | The placement ID sent with the auction. |
fun load(customizer: FloxisNextGenRequestCustomizer = FloxisNextGenRequestCustomizer.NONE) | Runs an auction, then loads the banner. Later refreshes reuse customizer. |
fun pause() / fun resume() | Stops and restarts refresh. |
fun destroy() | Stops refresh and drops pending callbacks. You still own and destroy the AdView. |
const val DEFAULT_REFRESH_SECONDS: Int | 60 |
Refresh follows the same rules as FloxisBannerAd. When a refresh replaces a banner, Floxis destroys the old BannerAd.
val banner = FloxisNextGenBannerAd(
adView = adView,
adMobAdUnitId = "ca-app-pub-XXXX/BANNER",
adSize = AdSize.BANNER,
configId = "home_banner",
sizes = listOf(FloxisSize(320, 50)),
)
banner.load()FloxisNextGenInterstitialAd#
| Member | Description |
|---|---|
val ad: InterstitialAd | The loaded Next-Gen ad. |
val auction: AuctionOutcome | The Floxis auction for this load. |
val isFloxisWinner: Boolean | true when the Floxis Custom Event served this ad. |
fun show(activity: Activity, eventCallback: InterstitialAdEventCallback? = null): FloxisShowResult | Shows the ad once. eventCallback is installed as is, so its events arrive on Google's background thread. |
fun destroy() | Marks the ad destroyed, removes its callback and destroys the Google ad. |
companion fun load(context, adMobAdUnitId, configId, callback, options, customizer): FloxisLoadHandle | Runs an auction, then loads the interstitial. |
load parameters, in order: context: Context, adMobAdUnitId: String, configId: String,
callback: FloxisNextGenLoadCallback<FloxisNextGenInterstitialAd>,
options: FloxisInterstitialOptions = FloxisInterstitialOptions(),
customizer: FloxisNextGenRequestCustomizer = FloxisNextGenRequestCustomizer.NONE.
FloxisNextGenRewardedAd#
| Member | Description |
|---|---|
val ad: RewardedAd | The loaded Next-Gen ad. |
val auction: AuctionOutcome | The Floxis auction for this load. |
val isFloxisWinner: Boolean | true when the Floxis Custom Event served this ad. |
fun show(activity: Activity, onUserEarnedReward: OnUserEarnedRewardListener, eventCallback: RewardedAdEventCallback? = null): FloxisShowResult | Shows the ad once. Both callbacks are Google's and arrive on its background thread. |
fun destroy() | Marks the ad destroyed, removes its callback and destroys the Google ad. |
companion fun load(context, adMobAdUnitId, configId, callback, customizer, videoOptions): FloxisLoadHandle | Runs a video auction, then loads the rewarded ad. |
load parameters, in order: context: Context, adMobAdUnitId: String, configId: String,
callback: FloxisNextGenLoadCallback<FloxisNextGenRewardedAd>,
customizer: FloxisNextGenRequestCustomizer = FloxisNextGenRequestCustomizer.NONE,
videoOptions: FloxisVideoOptions = FloxisVideoOptions().
rewarded?.show(this, { reward -> runOnUiThread { grant(reward) } })Android: Google Ad Manager (floxis-sdk-gam)#
Available from the next release; contact your Floxis account manager for early access.
Package com.floxis.sdk.gam, plus the shared types. Built on play-services-ads 25.5.0, Prebid Mobile 3.4.0 and
Prebid's GAM event handlers 3.4.0. Minimum Android SDK 24; compileSdk 35. Cannot share an app with
floxis-sdk-nextgen.
Each wrapper runs a Floxis auction, then a GAM request that carries the bid. If the Floxis line item wins, Prebid renders
the Floxis creative; otherwise GAM's ad shows. Listeners are Prebid's own rendering listeners
(org.prebid.mobile.api.rendering.listeners.*). There is no FloxisAuctionListener: read the bid from
view.bidResponse or adUnit.bidResponse in onAdLoaded.
Rules for all three classes:
- One load per wrapper. Create a new wrapper for each ad request. A second
load()fails withAdException(INTERNAL_ERROR, "GAM ad slot already loaded; create a new wrapper for each request"). - When Floxis is disabled, not initialised or personalised ads are off, the wrapper skips the auction and sends a plain GAM request.
- When personalised ads are off,
npa=1is added to the GAM request after yourrequestConfigurationruns. - After
destroy(), no listener call reaches your app. requestConfigurationis Prebid'sAdManagerRequestConfiguration, a single methodconfigure(builder: AdManagerAdRequest.Builder)called for each GAM request.- Every constructor throws if
gamAdUnitIdorconfigIdis blank.
FloxisGamBannerAd#
public class FloxisGamBannerAd(
context: Context,
gamAdUnitId: String,
configId: String,
sizes: List<FloxisSize>,
listener: BannerViewListener,
requestConfiguration: AdManagerRequestConfiguration? = null,
)| Member | Description |
|---|---|
val view: BannerView | The Prebid banner view. Add it to your layout. |
fun load() | Runs the auction and the GAM request. Call once. |
fun destroy() | Destroys the view. Call it with your screen's lifecycle. |
sizes must not be empty. There is no built-in refresh: create a new wrapper to refresh.
val banner = FloxisGamBannerAd(this, "/1234/home_banner", "home_banner", listOf(FloxisSize(320, 50)),
object : BannerViewListener {
override fun onAdLoaded(bannerView: BannerView) { }
override fun onAdDisplayed(bannerView: BannerView) { }
override fun onAdFailed(bannerView: BannerView, exception: AdException) { }
override fun onAdClicked(bannerView: BannerView) { }
override fun onAdClosed(bannerView: BannerView) { }
})
container.addView(banner.view)
banner.load()FloxisGamInterstitialAd#
public class FloxisGamInterstitialAd(
activity: Activity,
gamAdUnitId: String,
configId: String,
options: FloxisInterstitialOptions = FloxisInterstitialOptions(),
listener: InterstitialAdUnitListener,
requestConfiguration: AdManagerRequestConfiguration? = null,
)In Kotlin, name listener when you leave out options. Java also has a four-argument constructor
(activity, gamAdUnitId, configId, listener).
| Member | Description |
|---|---|
val adUnit: InterstitialAdUnit | The Prebid ad unit. |
fun load() | Runs the auction and the GAM request. Call once. |
fun show(): Boolean | Shows the ad once, after onAdLoaded. Returns false if the ad is not ready or was already shown. |
fun destroy() | Destroys the ad unit. |
FloxisGamRewardedAd#
public class FloxisGamRewardedAd(
activity: Activity,
gamAdUnitId: String,
configId: String,
listener: RewardedAdUnitListener,
requestConfiguration: AdManagerRequestConfiguration? = null,
videoOptions: FloxisVideoOptions = FloxisVideoOptions(),
)| Member | Description |
|---|---|
val adUnit: RewardedAdUnit | The Prebid ad unit. |
fun load() | Runs a video auction and the GAM request. Call once. |
fun show(): Boolean | Shows the ad once, after onAdLoaded. |
fun destroy() | Destroys the ad unit. |
Grant the reward only from onUserEarnedReward. onAdClosed reaches your listener at most once. A rewarded video bid
that cannot render is withheld from GAM and FLX-204 is logged; if GAM then has no fill, onAdFailed receives a
NO_BIDS error.
Android: AppLovin MAX (floxis-sdk-max)#
Available from the next release; contact your Floxis account manager for early access.
Package com.floxis.sdk.max, plus the shared types. Built on com.applovin:applovin-sdk 13.1.0, Prebid Mobile 3.4.0
and Prebid's MAX adapters 3.4.0. Minimum Android SDK 24; compileSdk 35. Can share an app with every other Floxis
artifact.
Initialise the AppLovin SDK after Floxis.initialize calls back: the Prebid MAX adapter needs Prebid ready first. Each
wrapper runs a Floxis auction, then calls loadAd() on your MAX object whatever the auction result, so your other MAX
networks still compete. MAX's own listeners report load, show, hide and reward.
FloxisMaxBannerAd#
public class FloxisMaxBannerAd(
adView: MaxAdView,
configId: String,
size: FloxisSize,
refreshIntervalSeconds: Int = DEFAULT_REFRESH_SECONDS,
listener: FloxisAuctionListener? = null,
)sizemust beFloxisSize(320, 50)(banner) orFloxisSize(300, 250)(MREC), or the constructor throws. Create an MREC view withMaxAdView(adUnitId, MaxAdFormat.MREC, context).- The constructor stops MAX auto-refresh on
adView. Floxis owns refresh:60seconds by default,0or less turns it off, other values are clamped to 30..120, with the same visibility rules asFloxisBannerAd.
| Member | Description |
|---|---|
val gpid: String | The placement ID sent with the auction. |
fun load() | Runs an auction, then adView.loadAd(). |
fun pause() / fun resume() | Stops and restarts refresh. Call them from your screen's lifecycle. |
fun destroy() | Stops refresh. The banner also destroys itself when its activity is destroyed. Destroy the MaxAdView yourself. |
const val DEFAULT_REFRESH_SECONDS: Int | 60 |
FloxisMaxInterstitialAd#
public class FloxisMaxInterstitialAd(
context: Context,
ad: MaxInterstitialAd,
configId: String,
options: FloxisInterstitialOptions = FloxisInterstitialOptions(),
)| Member | Description |
|---|---|
fun load(listener: FloxisAuctionListener? = null): FloxisLoadHandle | Runs an auction, then ad.loadAd(). Cancels any load still pending on this wrapper. |
fun cancel() | Cancels the pending load. |
Keep one wrapper per MAX ad object and call load() again to reload. Show with MAX's own showAd.
FloxisMaxRewardedAd#
public class FloxisMaxRewardedAd(
context: Context,
ad: MaxRewardedAd,
configId: String,
videoOptions: FloxisVideoOptions = FloxisVideoOptions(),
)Same load and cancel as the interstitial. Grant the reward only from MAX's onUserRewarded. A rewarded video bid
that cannot render is declined before MAX sees it: the auction ends NO_BID and FLX-204 is logged.
val rewarded = MaxRewardedAd.getInstance("YOUR_MAX_UNIT", this)
rewarded.setListener(maxListener)
val loader = FloxisMaxRewardedAd(this, rewarded, "rewarded_main")
loader.load { outcome -> Log.d("Floxis", "$outcome") }Android: Unity LevelPlay (floxis-sdk-levelplay)#
Available from the next release; contact your Floxis account manager for early access.
A LevelPlay custom network adapter. You never call it: LevelPlay loads its classes once you add the Floxis custom
network with the network key your account manager gives you. Add com.unity3d.ads-mediation:mediation-sdk 9.6.1 and
org.jetbrains.kotlinx:kotlinx-coroutines-android 1.10.1 to your app. The adapter is built on floxis-sdk-common and
exposes it and Prebid Mobile core 3.4.0 as API dependencies, so your code can call TargetingParams without adding
Prebid Mobile. It does not use FloxisConfig or Floxis.*.
Classes LevelPlay loads#
| Role | Class | Base class |
|---|---|---|
| Network adapter | com.ironsource.adapters.custom.floxis.FloxisCustomAdapter | LevelPlayBaseAdapter |
| Banner | com.ironsource.adapters.custom.floxis.FloxisCustomBanner | LevelPlayBaseBanner |
| Interstitial | com.ironsource.adapters.custom.floxis.FloxisCustomInterstitial | LevelPlayBaseInterstitial |
| Rewarded video | com.ironsource.adapters.custom.floxis.FloxisCustomRewardedVideo | LevelPlayBaseRewardedVideo |
FloxisCustomAdapter.getAdapterVersion() returns the Floxis SDK version and getNetworkSDKVersion() returns the
Prebid Mobile version. LevelPlay shows both in its tools.
Network parameters#
| Key | Level | Default | Rule |
|---|---|---|---|
seat | App | required | 1 to 128 characters of A-Z a-z 0-9 . _ - |
region | App | us-e | A lowercase host label |
timeoutMs | App | 1500 | Whole number, 200 to 10,000 |
configId | Instance | required | Placement name |
Values may be entered as text or numbers. Use the same seat and region as any other Floxis artifact in the app.
Behaviour#
- Formats. Banner at any LevelPlay size (a smart banner becomes 728x90 on screens wider than 720 dp, otherwise 320x50; LevelPlay drives refresh), display interstitial, and rewarded video.
- Consent. No auction runs after
LevelPlay.setConsent(false), when GDPR applies without a TC string or Purpose 1 consent, after a US Privacy opt-out, or when an applicable GPP US section records an opt-out of sale, sharing or targeted advertising. LevelPlay does not pass its CCPA or COPPA settings to custom networks, so the adapter reads the IAB keys your consent tool writes. COPPA does not block the auction: setTargetingParams.setSubjectToCOPPA(true)and it is sent with the request. - Signals. Every auction carries the device and session signals described in SDK privacy and consent. The adapter shares one session with the other Floxis artifacts in the app.
- Location. Never sent.
- Expiry.
isAdAvailableandshowAdcheck consent again and refuse a bid past its expiry (300 seconds unless the bid says otherwise). - Rewards. The reward and the close are each reported once.
Load and init failures#
| Message | Error | Fix |
|---|---|---|
Invalid Floxis seat, region, or timeoutMs | init, ADAPTER_ERROR_MISSING_PARAMS | Correct the app-level parameters. |
Floxis process already configured for a different seat, region, or timeout | init, internal | Use one seat, region and timeout for the whole app. |
Prebid already initialized for another auction host or account | init, internal | Another Floxis artifact in the app uses a different seat or region. Make them match. |
Prebid auction host or account differs from Floxis configuration | init, internal | Something else in the app changed Prebid's host or account during start-up. Use one seat and region for every Floxis artifact. |
Invalid banner size | load, ADAPTER_ERROR_MISSING_PARAMS | The LevelPlay banner size has no width or height. |
Floxis not initialized | load, internal | LevelPlay has not finished initialising the network. |
Prebid auction host or account changed | load, internal | Seats or regions differ between Floxis artifacts. |
Floxis configuration differs from initialized network | load, internal | Instance settings disagree with app settings. |
Missing configId | load, ADAPTER_ERROR_MISSING_PARAMS | Set configId on the instance. |
Advertising restricted by privacy signals | load, no fill (10001) | Expected when consent is withheld. |
A Floxis no-bid reaches LevelPlay as ADAPTER_ERROR_TYPE_NO_FILL with code 10001.
iOS (FloxisSDK, FloxisSDKCore)#
Not yet published. Available from the next release; contact your Floxis account manager for early access.
A Swift package with two products. FloxisSDKCore holds configuration and value types with no dependencies. FloxisSDK
holds the ad wrappers and depends on Prebid Mobile iOS 3.4.0, Prebid's AdMob adapters and Google Mobile Ads 13.8.0 or
newer (below 14). Minimum iOS 15, Swift 5.9.
FloxisSDK does not re-export FloxisSDKCore, so import both. Import PrebidMobile too if you set Prebid targeting
such as Targeting.shared.subjectToCOPPA.
import FloxisSDK
import FloxisSDKCore
import GoogleMobileAdsFloxis#
@MainActor public final class Floxis. Use Floxis.shared.
| Member | Description |
|---|---|
static let shared: Floxis | The single instance. |
static let sdkVersion: String | The Floxis iOS SDK version. |
var onDiagnostic: ((FloxisDiagnostic) -> Void)? | Receives every diagnostic code, even with debug: false. |
private(set) var configuration: FloxisConfiguration? | The configuration passed to initialize. |
private(set) var isInitialized: Bool | true once the auction client is ready. |
private(set) var isEnabled: Bool | The current kill-switch state. false until initialize. |
private(set) var personalizedAds: Bool | The current personalised-ads state. |
private(set) var testAuctions: Bool | true when testMode is in effect, which needs a debuggable build. |
func initialize(_ configuration: FloxisConfiguration, completion: @escaping (FloxisInitializationStatus, String?) -> Void) | Starts Floxis. |
func setEnabled(_ enabled: Bool) | Kill switch at runtime. true starts Floxis if it has not started. |
func setPersonalizedAds(_ allowed: Bool) | false skips later auctions, adds npa=1 to each wrapper's own Google request, and refuses to show a full-screen ad Floxis won. |
func auctionURL() -> URL? | The auction URL, or nil before initialize. |
initialize
- Call it after Google Mobile Ads has started and your consent tool has run.
- A second call with a different seat or region reports
.failedwith "Floxis is already configured for another seat or region". A second call with the same seat and region takes its other settings. If start-up already succeeded, it reports that result; otherwise it starts again. - With
enabled: falseit reports.disabled. - Start-up gives up after 12 seconds. A later ad load retries a failed start-up, at most once every 30 seconds.
- The completion may run before
initializereturns.
let configuration = try FloxisConfiguration(seat: "YOUR_SEAT", region: "us-e")
Floxis.shared.initialize(configuration) { status, detail in
print("Floxis init: \(status) \(detail ?? "")")
}FloxisInitializationStatus | Meaning |
|---|---|
.succeeded | Ready. |
.serverStatusWarning | Ready, but the status check did not answer cleanly. |
.failed | Not ready. The detail says why. |
.disabled | enabled was false. |
FloxisDiagnostic has code: String and message: String. See the code table below.
FloxisSDKError:
| Case | When |
|---|---|
.noLoadedAd | Passed to a full-screen load completion when Google returned neither an ad nor an error. |
.missingBundledScript(String) | Start-up could not find a bundled rendering script. initialize reports .failed with this in the detail. Remove and re-add the package. |
.notConfigured | Not normally seen. Before initialize, loads report .skippedDisabled. |
.differentSeatAlreadyInitialized | Declared for future use. Not raised today. |
FloxisConfiguration (FloxisSDKCore)#
public init(seat: String, region: String = "us-e", timeoutMs: Int = 1_500, debug: Bool = false,
testMode: Bool = false, enabled: Bool = true, personalizedAds: Bool = true,
storeURL: URL? = nil, shareLocation: Bool = true) throwsThe fields match Android's FloxisConfig, with these differences:
storeURLmust be anhttpsURL with a host, for examplehttps://apps.apple.com/app/id123456789.debugwritesFloxis <code> <message>lines to the Xcode console.testModetakes effect only in the Simulator or in a build signed with a development profile. App Store, TestFlight, ad hoc and enterprise builds ignore it and reportFLX-105.shareLocationsends a location only when the app already has location authorization. It follows Android's rules: no location for a child-directed request, when GDPR applies without TCF special feature 1, or after a US Privacy or GPP US opt-out.
The initializer throws FloxisConfigurationError: .invalidSeat, .invalidRegion, .invalidTimeout or
.invalidStoreURL. .invalidConfigID is thrown by requestConfiguration for a placement ID that is empty or longer than
128 characters; a wrapper reports it as an auction .error and still loads Google.
| Property | Description |
|---|---|
auctionURL: URL | https://<region>.floxis.tech/pbm/openrtb2/auction?seat=<seat> |
statusURL: URL | The start-up status URL for the same seat. |
FloxisBannerAd#
public init(configID: String, size: CGSize, bannerView: GoogleMobileAds.BannerView,
refreshIntervalSeconds: Int = 60)| Member | Description |
|---|---|
let bannerView, configID, size, refreshIntervalSeconds | As passed. refreshIntervalSeconds is stored after clamping: 0 or less turns refresh off, other values become 30..120. |
var additionalSizes: [CGSize] | Extra sizes Floxis may bid. |
var requestFactory: () -> GoogleMobileAds.Request | Returns a fresh Google request for each load. Floxis keeps your extras. |
func load(completion: @escaping (FloxisAuctionOutcome) -> Void) | Runs an auction, then loads bannerView. completion is called after every load, refreshes included. |
func pause() / func resume() | Stops and restarts refresh. Refresh also stops while the app is in the background and waits while the view is not in a window. |
func adMobDidFailToLoad(_ error: Error) | Call it from your BannerViewDelegate's bannerView(_:didFailToReceiveAdWithError:). |
func destroy() | Stops refresh and drops pending callbacks. |
Set the banner view's ad unit ID and root view controller yourself, and turn off AdMob's automatic refresh.
let bannerView = BannerView(adSize: AdSizeBanner)
bannerView.adUnitID = "ca-app-pub-XXXX/BANNER"
bannerView.rootViewController = self
let banner = FloxisBannerAd(configID: "home_banner", size: CGSize(width: 320, height: 50), bannerView: bannerView)
banner.load { outcome in print(outcome.status, outcome.priceBucket ?? "") }FloxisInterstitialAd and FloxisRewardedAd#
// FloxisInterstitialAd
public init(configID: String, adMobUnitID: String, format: FloxisInterstitialFormat = .displayAndVideo,
videoOptions: FloxisVideoOptions = FloxisVideoOptions())
// FloxisRewardedAd
public init(configID: String, adMobUnitID: String, videoOptions: FloxisVideoOptions = FloxisVideoOptions())| Member | Description |
|---|---|
let configID, adMobUnitID, videoOptions (and format on interstitial) | As passed. |
var requestFactory: () -> GoogleMobileAds.Request | Returns a fresh Google request for each load. |
var onDismiss: (() -> Void)? | Called when the ad is dismissed. |
var onShowFailure: ((Error) -> Void)? | Called when Google fails to present the ad. |
var isReady: Bool | true when an ad is loaded, not shown, not destroyed and not expired. |
var isFloxisWinner: Bool | true when the Floxis Custom Event served the loaded ad. |
func load(completion: @escaping (FloxisAuctionOutcome, Error?) -> Void) | Runs an auction, then loads the Google ad. The error is Google's load error, or nil on success. |
func show(from: UIViewController) -> FloxisShowResult | Interstitial. Shows the ad once. |
func show(from: UIViewController, userDidEarnReward: @escaping () -> Void) -> FloxisShowResult | Rewarded. Grant the reward only from userDidEarnReward. |
func destroy() | Drops the ad and any pending callback. |
A loaded ad expires one hour after it loads. Keep the wrapper alive until the ad is dismissed.
FloxisShowResult | Meaning |
|---|---|
.shown | Presented. |
.notReady | No ad is loaded. |
.alreadyShown | Already shown. Load again. |
.destroyed | destroy() was called. |
.expired | The ad expired. Load again. |
.disabled | Floxis won, but Floxis was disabled or personalised ads were turned off before show. |
let rewarded = FloxisRewardedAd(configID: "rewarded_main", adMobUnitID: "ca-app-pub-XXXX/REWARDED")
rewarded.load { outcome, error in print(outcome.status, error as Any) }
if rewarded.isReady {
_ = rewarded.show(from: self) { grantReward() }
}FloxisInterstitialFormat and FloxisVideoOptions#
FloxisInterstitialFormat is .display, .video or .displayAndVideo, as on Android.
FloxisVideoOptions(minDurationSeconds: Int? = nil, maxDurationSeconds: Int? = nil, skippable: Bool? = nil) works as on
Android, but does not validate its values.
FloxisAuctionOutcome and FloxisAuctionStatus (FloxisSDKCore)#
FloxisAuctionOutcome has status, priceBucket: String?, latencyMs: Int and detail: String?. It has no response
ID. FloxisAuctionStatus is .bid, .noBid, .timeout, .error, .skippedDisabled, .skippedNoConsent or
.skippedNotInitialized, with the same meanings as Android.
Other FloxisSDKCore types#
These public types build the auction request. Most apps never use them.
| Type | Description |
|---|---|
FloxisSDKInfo | version ("0.2.1"), flavor ("ios"), and the request header names versionHeader (X-Floxis-SDK-Version) and flavorHeader (X-Floxis-SDK-Flavor). |
FloxisConfiguration.requestConfiguration(configID:includeDisplay:videoSize:isFullScreen:isRewarded:deviceSignals:sessionSignals:) throws -> FloxisRequestConfiguration | Builds the request settings for one placement. |
FloxisRequestConfiguration | The request settings, with globalORTB and impressionORTB JSON strings. |
FloxisDeviceSignals(darkMode:batteryLevel:charging:batterySaver:audioMuted:) | Device signals for one request. All optional. |
FloxisSessionSignals(impressionDepth:sessionDurationSeconds:) | Session signals for one request. |
FloxisSessionTracker | shared, nextImpression(now:) and reset(now:). Counts the auctions in the session that carried the signals. |
FloxisAdNetwork | isFloxisInterstitial(_:) and isFloxisRewarded(_:): whether a Google adapter class name is a Floxis Custom Event. |
The SDK sends device and session signals, and the muted state behind video playbackmethod, only when personalised
ads are on, GDPR does not apply or the TC string grants Purpose 1, and neither the US Privacy string nor an applicable
GPP US section records an opt-out. Battery level and charging state appear only when your app has turned on
UIDevice.current.isBatteryMonitoringEnabled. Before each auction the SDK copies Google Mobile Ads' child-directed
setting into Targeting.shared.subjectToCOPPA; when that setting is unspecified, the value you set is kept.
Log and diagnostic codes#
Android logs under the logcat tag Floxis (adb logcat -s Floxis). Warnings always log; debug lines log only with
debug = true. iOS sends every code to Floxis.shared.onDiagnostic, and to the console with debug: true.
| Code | Level | Meaning | Platforms |
|---|---|---|---|
FLX-100 | debug | Start-up began. | Android |
FLX-101 | debug | Start-up finished. Look for SUCCEEDED. | Android, iOS |
FLX-102 | warning | Disabled by config. Nothing started. | Android |
FLX-103 | warning | Android: start-up threw an error (a failed start logs FLX-101 FAILED). iOS: start-up failed. | Android, iOS |
FLX-104 | warning | Retrying a failed start-up. | Android |
FLX-105 | warning | testMode ignored: not a debuggable build. | Android, iOS |
FLX-200 | debug | Auction result. | Android |
FLX-201 | debug | Auction skipped (disabled, no consent or not initialised). | Android, iOS |
FLX-202 | warning | Android: a bid expired before the ad server load. iOS: a loaded Floxis ad expired before show. | Android, iOS |
FLX-203 | warning | Auction failed or timed out. | Android, iOS |
FLX-204 | warning | Rewarded video bid declined: it has neither a click-through nor an end card. | Android |
FLX-300 | debug | Banner refresh fired. | Android |
FLX-301 | debug | Banner refresh deferred: app in background, screen off or banner not visible. | Android |
FLX-302 | warning | Banner refresh failed. | Android |
FLX-303 | debug | Banner refresh stopped: view detached or host destroyed. | Android |
FLX-400 | warning | A show was refused. | Android, iOS |
FLX-500 | diagnostic | Google Mobile Ads failed to load. | iOS |
Unity LevelPlay has no log tag. Its results arrive as LevelPlay callback messages (see the LevelPlay section).
Platform differences#
| Topic | Android | iOS |
|---|---|---|
| Config type | FloxisConfig (throws IllegalArgumentException) | FloxisConfiguration (throws FloxisConfigurationError) |
| Re-initialise with another seat | Replaces the config | Fails with .failed |
Load before initialize | SKIPPED_NOT_INITIALIZED | .skippedDisabled |
| Auction listener | FloxisAuctionListener | Completion closures |
| Response ID on outcome | AuctionOutcome.responseId | Not available |
| Full-screen expiry | The bid's own expiry (300 seconds by default) | One hour after load |
| Show refused after personalised ads turn off | No | Yes (.disabled) |
show when not loaded | Not possible: you hold a loaded ad | .notReady |
| AdMob child-directed tag | Copied to the auction's COPPA flag (AdMob, Next-Gen, GAM) | Copied to the auction's COPPA flag |
| Location on child-directed requests | Withheld | Withheld |
| Session reset after 30 idle minutes | Yes (next release) | No: one session per app process |
| Device signals on the request | user.ext.floxis.device, moved to device.ext by the exchange | device.ext |
Related guides#
- In-app SDK (Android): setup for
floxis-sdkandfloxis-sdk-nextgen. - In-app SDK (iOS, AdMob): setup for the Swift package.
- In-app SDK (Google Ad Manager), In-app SDK (AppLovin MAX) and In-app SDK (Unity LevelPlay): setup for each mediation path.
- SDK privacy and consent: what the SDK reads and sends, and when.
- SDK testing and troubleshooting: test mode, logs and common issues.
- SDK release notes: what changed in each version.