AlmediaSDK · class
Mutable POCO you build at runtime and pass to Initialize. Code-supplied values override the corresponding AlmediaLinkSettings defaults. Nullable wrappers (int?, bool?) signal “fall back to settings” - set them only when you want a code-supplied value to override the asset.
Fields
Polling interval. The backend can set the polling interval.
NotificationsPollingIntervalSec applies when it sets none.
Platform selection. During Initialize, the bridge picks IosIntegrationKey on iOS builds and AndroidIntegrationKey on Android builds. In the Editor, the SDK prefers iOS but falls back to Android if iOS is empty. Only the platform-relevant key is forwarded to the native layer.
Empty strings vs null. For the string identifiers (Gaid, Idfa, etc.), the SDK treats null and "" interchangeably and forwards an empty string to native when neither config nor caller provides one. Pass null if you don’t have the value.
Idfv (iOS). Identifier for Vendor. When omitted (null or ""), the iOS native layer collects it automatically via UIDevice.current.identifierForVendor; a supplied value overrides it. Unlike Idfa, it is not gated behind ATT. iOS-only - ignored on Android. Requires the matching iOS native binary; older bundled plugins ignore the field.
Android device identifiers. The native SDK collects identifiers on its own where the platform allows, and mints its own install-scoped ALID, so initialization succeeds even when nothing can be collected and no identifier is passed - though where Almedia has not enabled it for the integration, that ALID is never stored and the SDK reports not-available. Supplying Gaid, Asid, Oaid, AdjustDeviceId, or AppsFlyerId improves attribution. The C# layer does not pre-validate identifiers. Identifiers that don’t apply to the running platform are ignored, so they can be set unconditionally.
AdjustDeviceId / AppsFlyerId / TenjinAnalyticsInstallationId (both platforms). When not supplied, the native layer on iOS and Android reads each one from what the Adjust, AppsFlyer or Tenjin SDK bundled in the app has stored, once the backend enables that identifier for the integration; a supplied value always wins. Requires the matching native binaries; older bundled plugins send only the supplied values.
TrafficSource. Where the user was originally acquired, sent as sub3 on the linking URL. Pass your MMP’s media source verbatim, e.g. applovin_int or googleadwords_int. The same rules as Meta1-Meta4 below apply.
Meta1-Meta4. Optional values that the SDK appends to the linking URL. Reward hub and offer URLs never carry them. The SDK does not read or modify them. Use them to receive your own data back in S2S reports.
- Each value is limited to 250 UTF-8 bytes. A multi-byte character counts as more than one byte.
- A longer value is left off the link, and a warning at initialization names it. Initialization and linking still proceed.
- An empty value is treated as unset.
- Your value replaces any parameter of the same name already on the link.
- Changing a value re-initializes the session. Set them once, at startup.
DisabledFeatures. The parts of the Link experience this game hides from the current player - see AlmediaFeature. Getter-only and never null; declare it with a collection initializer: new AlmediaConfig { DisabledFeatures = { AlmediaFeature.Offer } }. Joined with the settings asset’s Disabled Features as a union: the asset is the floor, code adds and never removes. The set is sent once at Initialize; a different set on a later call re-initializes.
BackendUrl / AttBackendUrl. The backend to talk to, as an origin: https://host or https://host:port. Null or empty means production. AttBackendUrl is iOS only: the host that receives the IDFA once the player grants tracking. Without it a custom backend never receives the IDFA. Set them in development builds only. A release build whose code contains the testing backend URL fails to build. A release build that still sets a backend logs an error on every Initialize, and a store build talks to production instead, with OnErrorOccurred reporting InvalidConfiguration. An invalid value logs a warning in the Editor and fails Initialize on a device with InvalidConfiguration; Android ignores AttBackendUrl. A different backend re-initializes. See Test your integration.