Data object Recommendation2
interface struct Recommendation2
Extends Recommendation
Represents a recommendation displayed on the device home screen. Supports content images
fetched from a URI, or included inline as a byte array.
Image Handling
- Requires exactly one image source:
- contentImageUri: URI reference to image
- contentImage: Direct byte array of image data
- If both sources are provided, byte array takes precedence
- Missing both sources triggers InvalidArgumentError
- Text must be concise for UI optimization
- All string content must use UTF-8 encoding
- Size limit: 512KB per recommendation (excluding the contentImage, if provided)
Fields
contentImageUri
string — Required
URI of the recommendation’s display image. Must meet specified requirements for proper display.
Image Requirements:
- Aspect ratio: 16:9
- Orientation: Landscape
- Title: Must be embedded within image
- Not be displayed, or
- Be replaced with a default placeholder image

