Edit in GitHubLog an issue

Surface

The Surface class represents an entity for user or system interaction. It is identified by a self-describing URI which is used to fetch the decision propositions from the AJO campaigns. For example, all mobile application surface URIs start with mobileapp://, followed by app bundle identifier and an optional path.

iOS Interface - Surface

Surface class is used to create surface instances for requesting propositions in personalization query requests.

Public variables

uri

Unique surface URI string.

Copied to your clipboard
public let uri: String

Public functions

init

Creates a new surface by appending the given surface path to the mobile app surface prefix.

Swift

Syntax

Copied to your clipboard
public init(path: String)
  • path is a string representation for the surface path.

Example

Copied to your clipboard
// Creates a surface instance representing a banner within homeView view in my mobile application.
let surface = Surface(path: "homeView#banner")

Android Interface - Surface

Surface class is used to create surface objects for requesting propositions in personalization query requests.

Public functions

Parameterized Constructor

Creates a new surface by appending the given surface path to the mobile app surface prefix.

Java

Syntax

Copied to your clipboard
public Surface(final String path)
  • path is a string containing the surface path.

Example

Copied to your clipboard
// Creates a surface instance representing a banner view within homeActivity in my mobile application.
final Surface surface = new Surface("homeActivity#banner")

Default Constructor

Creates a new base surface by appending application package name to the mobile app surface prefix mobileapp://.

Java

Syntax

Copied to your clipboard
public Surface()

Example

Copied to your clipboard
// Creates a new base surface by appending application package name to the mobile app surface prefix mobileapp://
final Surface surface = new Surface()

getUri

Returns this surface's URI as a string.

Java

Syntax

Copied to your clipboard
public String getUri()

Example

Copied to your clipboard
final Surface surface = new Surface("homeActivity#banner")
final String uri = surface.getUri()
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.