Targeting

data class Targeting(val deviceType: String? = null)

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)

Properties

Link copied to clipboard

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