Package-level declarations

Data models and runtime wrappers for LiG scenes. The Gson payload classes cover the light and scene responses, scene objects, games, bot, user profile, light pose and navigation map. The runtime classes (ArObjectModel, ArEventModel, ArActionModel) turn parsed scene JSON into scene nodes, event triggers and executable actions. The enums decode the numeric model, event, action and vibration codes, and ProgressResponseBody and RetryInterceptor are the OkHttp helpers for download progress and retries.

Types

Link copied to clipboard
data class AdaptationResponse(var id: Int?, var brand: String?, var model: String?, var date: String?, var adapted: String?, var created_at: String?, var updated_at: String?, var message: String?) : Serializable

Device-adaptation record for a device brand and model.

Link copied to clipboard
data class AiBotResponse(val recognizedText: String, val responseText: String, val audioUrl: String, val base64Tts: String)

Voice AI-bot reply: recognized speech, answer text and synthesized speech.

Link copied to clipboard

Action type codes of an AR object, as carried in the id field of a scene action (tw.com.lig.sdk.player.model.arObject.arEvents.ArAction.id).

Link copied to clipboard
class ArActionModel(val action: ArAction)

Read-only view over one scene action (ArAction) that supplies defaults for missing values and builds the runnable action.

Link copied to clipboard

Trigger types of an AR object event, as carried in the id field of a scene event (tw.com.lig.sdk.player.model.arObject.ArEvent.id).

Link copied to clipboard

Process-wide registry of long-running event coroutines, keyed by name.

Link copied to clipboard
class ArEventModel(event: ArEvent, arEventManager: ArEventManager)

Runtime wrapper of one scene event (ArEvent) that wires its trigger to a node.

Link copied to clipboard
data class ArItemPhoto(var url: String) : Serializable

Photo entry ({"url": ...}) inside shop, review and post payloads.

Link copied to clipboard
data class ArItemPost(var id: Int, var title: String, var content: String, var source: String, var url: String, var photos: ArrayList<ArItemPhoto>, var postDate: String) : Serializable

Article/post entry of the old AR item payload.

Link copied to clipboard
data class ArItemReview(var rating: Float, var type: Any? = null, var authorName: String, var authorUrl: String, var text: String, var time: Long, var profilePhotoUrl: String) : Serializable

User review of a shop or place, as found in shop payloads (ShopInfo.reviews) and in the per-language *_reviews lists of action values.

Link copied to clipboard

AR object model types, as carried in model.type of an AR object in the scene JSON.

Link copied to clipboard
data class ArObject(var id: Int = -1, var name: String = "", var location: Location = Location(), var zoom: Zoom = Zoom(), var model: ArModel? = null, var events: ArrayList<ArEvent>? = null, var subEvents: HashMap<String, ArrayList<ArEvent>?>? = null, var transparency: Float = 1.0f, var sceneId: Int? = null, var children: List<ArObject> = emptyList()) : Serializable

One AR object of a scene, as found in the ar_objects array of a scene payload (ArScenes.arObjects).

Link copied to clipboard
class ArObjectModel(val arObject: ArObject) : Cloneable

Runtime model of one AR object: exposes its parsed scene data with defaults, creates its events, and builds its scene node.

Link copied to clipboard
data class ArScenes(var sceneID: Int? = null, var name: String? = null, var thumbnail: String? = null, var assets_url: String? = null, var arObjects: ArrayList<ArObject>? = null, var startTime: String? = null, var endTime: String? = null, var activityId: Int? = null, var actions: Map<String, List<ArAction>>? = null, var credentials: Map<String, Credential>? = null, var gameReset: Boolean? = null, var isIntegratedBluetooth: Boolean = false, val recordingAudioWire: String? = null) : Serializable

One scene: its AR objects plus scene-level metadata, named actions and credentials.

Link copied to clipboard
data class BotResponse(val data: List<QuestionResponse>, val recommendations: Recommendations)

Reply of the LiG AI bot chat endpoint (POST /api/v1/chats on the bot service), sent by the ArActionEnum.AI_BOT action.

Link copied to clipboard
data class CoordinateSystem(var scenes: List<ArScenes>, var mapUrl: String, var infoUrl: String, var navigation: Navigation? = null) : Serializable

The scenes bound to one light (LiG ID), with its map and indoor-navigation data.

Link copied to clipboard
data class CoordinateSystemResponse(var coordinateSystem: CoordinateSystem) : Serializable

Top-level wrapper ({"coordinate_system": {...}}) of the scene-list responses of GET /api/v3/lights/{lightId}/scenes (SceneFormContext.loadScenes) and the deprecated GET /api/v3/ar_objects/?light_id={lightId} (SceneFormContext.load).

Link copied to clipboard
data class Credential(var type: String? = null, var url: String? = null, var id: String? = null, var pwd: String? = null, var additionals: Map<String, String>? = null) : Serializable

Login credential for an external data service, from the credentials map of a scene (ArScenes.credentials).

Link copied to clipboard
data class Destination(val name: String, val description: String, val thumbnail_url: String)

Navigation suggestion; tapping it starts indoor navigation to the mark named name.

Link copied to clipboard
data class ErrorBody(var errors: String? = null, var errors_message: String? = null, var error_code: Int? = null, var is_network_error: Boolean? = null) : Serializable

Error payload with snake_case keys. The SDK itself does not deserialize or create this class; the descriptions are taken from the field names.

Link copied to clipboard
data class ErrorModel(var errorMsg: String? = null, var errorCode: Int? = null, var isNetworkError: Boolean? = null)

Error description with camelCase fields. The SDK itself does not create this class; the descriptions are taken from the field names.

Link copied to clipboard
open class Game(response: GamesResponse)

Result of one games-API call (POST /api/v3/games), wrapping its GamesResponse.

Link copied to clipboard

Reward action codes of GamesResponse.action; each maps to one Game.ActionListener method.

Link copied to clipboard
data class GameResponseData(val count: Int, val total: Int, val action_name: String, val collected: Int, val code: Int, val coinQuantity: Int, val voucherTypeId: Int, val poolId: Int, val nextDestination: String)

Progress data of a GamesResponse. Only action_name is read by the SDK; the other descriptions are taken from the JSON keys. Missing keys leave Int fields 0 and String fields null, despite the non-null types.

Link copied to clipboard
data class GamesResponse(val status: String?, val action: Int, val game_type: Int, val game_id: Int, val game_name: String, val data: GameResponseData?, val code: Int? = null, val message: String? = null)

Reply of the games endpoint POST /api/v3/games (form field ar_object_id), sent by SceneFormContext.callGameAPI and wrapped in Game.

Link copied to clipboard

Game type codes, matching the game_type field of GamesResponse by name. The SDK itself does not reference this enum.

Link copied to clipboard
data class LightenARUser(var coins: Int? = null, var vouchers: List<Voucher>? = null) : Serializable

The registered user's game wallet, from UserProfileResponse.user.

Link copied to clipboard
data class LightPosition(var id: Long? = null, var location: Location? = null, var matrix: ArrayList<Float>? = null) : Serializable

Calibrated pose of a light (LiG ID), from GET /api/v1/light_position/{lightId}.

Link copied to clipboard

Asset loading states. The SDK itself does not reference this enum.

Link copied to clipboard
data class Mark(val location: Vector3 = Vector3(), var name: String = "")

Named navigation destination.

Link copied to clipboard
data class Navigation(val marks: List<Mark> = listOf(), val paths: List<Path> = listOf(), val map: String? = "")

Indoor navigation map of a light (CoordinateSystem.navigation): named destination marks and the walkable path segments between them.

Link copied to clipboard
data class NksdataLoginResponse(val d: String)

Reply of the external login call made for each scene Credential.

Link copied to clipboard
data class Path(val fx: Float = 0.0f, val fy: Float = 0.0f, val fz: Float = 0.0f, val tx: Float = 0.0f, val ty: Float = 0.0f, val tz: Float = 0.0f)

One walkable segment from (fx, fy, fz) to (tx, ty, tz). Segments are treated as two-way; endpoints at identical positions are joined into one graph vertex.

Link copied to clipboard
data class PolyhedronSpec(val faceCount: Int, val floorCount: Int, val faceWidth: Float, val floorHeight: Float, val floorGap: Float, val faceGap: Float, val faceGapList: List<Float>, val floorAngles: List<Float>, val speed: Float, val photos: List<String>)

The complete, validated wire data of a polyhedron AR object (ArModelEnum.NEW_POLYHEDRON, model type 13).

Link copied to clipboard
open class ProgressResponseBody(body: ResponseBody, attachmentDownloadListener: ProgressResponseBody.OnAttachmentDownloadListener? = null, progressView: ProgressHelperView? = null) : ResponseBody

OkHttp ResponseBody wrapper that reports download progress while the body is read.

Link copied to clipboard
data class QuestionResponse(val id: Int, val ai_response_text: String, val question: String, val prompt_id: Int, val session_id: String, val language: String?)

One answer in BotResponse.data.

Link copied to clipboard
data class Recommendations(val streaming_rooms: List<StreamingRoom>, val related_links: List<RelatedLink>, val destinations: List<Destination>)

Follow-up suggestions of a BotResponse; the recommendation board shows up to three of each kind.

Link copied to clipboard

What a video recorded inside a scene hears, set per scene by the manifest's recording_audio (Canonical AR Player Contract, §Scene recording audio; APP-857).

Link copied to clipboard
data class RegisterUserResponse(var status: String, var token: String) : Serializable

Reply of the user sign-up endpoint POST /api/v3/ext_sign_up (form field reference_key), sent by SceneFormContext.registerUser.

Link copied to clipboard
data class RelatedLink(val url: String, val description: String, val thumbnail_url: String)

Web page suggestion; tapping it opens url in the in-app web view.

Link copied to clipboard
class RetryInterceptor(maxRetries: Int) : Interceptor

OkHttp interceptor that retries a request after a transport failure (IOException) or an HTTP 5xx response. 4xx responses are returned without retrying.

Link copied to clipboard
data class Scenes(var scenes: List<ArScenes>) : Serializable

Scene list returned by the legacy endpoint GET /api/v1/ar_objects/?light_id={lightId}, used by LiGScene.readFromCloud.

Link copied to clipboard
data class ShopInfo(var id: Int?, var name: String? = null, var rating: Double, var address: String? = null, var tel: String? = null, var latitude: Double? = null, var longitude: Double? = null, var userRatingsTotal: Int, var isOpen: Boolean? = null, var category: Int = -1, var mainCategory: Int = -1, var reviews: ArrayList<ArItemReview>? = null, var photos: ArrayList<ArItemPhoto>? = null) : Serializable

Shop details (name, rating, contact, location, reviews, photos). The SDK itself does not deserialize this class; the descriptions are taken from the field names. Gson leaves a field null (or 0) when its key is missing, regardless of the Kotlin default.

Link copied to clipboard
data class StreamingRoom(val scene_id: Int, val reposition_to_camera: Boolean, val description: String, val thumbnail_url: String)

Scene suggestion; tapping it on the recommendation board switches to scene_id.

Link copied to clipboard
data class UserProfileResponse(var user: LightenARUser? = null) : Serializable

Reply of the user profile endpoint GET /api/v3/user_profile, sent by SceneFormContext.userProfile with the token from RegisterUserResponse.

Link copied to clipboard

Vibration styles of the ArActionEnum.PLAY_IMPACT_FEEDBACK action (impact_feedback_style).

Link copied to clipboard
data class Voucher(var id: Int? = null, var exchangeEndTime: String? = null, var isUsed: Boolean = false, var voucherTypeId: Int? = null, var userCodeName: String? = null, var serial: String? = null) : Serializable

One voucher owned by the user, from LightenARUser.vouchers.