Targeting

data class Targeting(val deviceType: String? = null, val platform: String? = null, val os: String? = null, val osVersion: OsVersionRange? = null, val unknownFields: List<String> = emptyList())

Targeting criteria attached to an AssetUri (mirrors the TS Targeting).

deviceType is a raw String, NOT the DeviceType enum, and that is deliberate. The TS DeviceType is a string enum, so at runtime an unrecognised value such as "foldable" stays a plain string: it does not equal the detected device, and it is not undefined, so resolveTargetedUri treats the entry as targeted-but-unmatched and skips it rather than adopting it as the untargeted default. Parsing into a nullable enum would collapse "unknown value" and "no value" into the same null and silently promote a foreign entry to the fallback — a real behavioural divergence on exactly the manifests a forward-compatible parser is supposed to tolerate.

Constructors

Link copied to clipboard
constructor(deviceType: String? = null, platform: String? = null, os: String? = null, osVersion: OsVersionRange? = null, unknownFields: List<String> = emptyList())

Properties

Link copied to clipboard

The targeted device class as written in the manifest (console, desktop, mobile, tablet, tv); null targets every device.

Link copied to clipboard
val os: String?

Target operating system as written in the manifest.

Link copied to clipboard

Inclusive version bounds for the target operating system.

Link copied to clipboard

Target platform as written in the manifest.

Link copied to clipboard

Names of targeting keys not recognized by this SDK version.