Vizbl

Overview

Embed a fully interactive AR scene into your Android app with Vizbl Android SDK.

Vizbl Android SDK

Vizbl Android SDK allows you to embed a fully interactive AR scene into your app and place 3D objects created in Vizbl into the real world.

The integration is designed to be simple:

  • you create and display VizblARScene
  • you receive a VizblARController
  • you load objects using tinuuid
  • the SDK handles AR, placement, guidance, and interaction

A demo project is available at github.com/VIZBL/vizbl-android-demo.

Minimal integration

@Composable
fun ARScreen() {
    var controller: VizblARController? = null

    VizblARScene(
        onControllerReady = { controller = it },
        onSessionReady = {
            controller?.let {
                val model = ARObjectReference.Single(
                    id = ARObjectIdentifier.Tinuuid("your-tinuuid"),
                    materialId = null
                )

                // launch the suspend add call from your coroutine scope
            }
        }
    )
}

Object identifiers

tinuuid

tinuuid is the unique identifier of a Vizbl object.

You copy it directly from the Vizbl dashboard.

materialId

materialId is the identifier of a material variant.

You also copy it from the Vizbl dashboard.

  • materialId in Android corresponds to hid in Vizbl
  • if it is not provided, the default material is used

AR lifecycle

  • AR starts automatically when VizblARScene is displayed
  • AR closes through the built-in SDK UI
  • lifecycle can also be controlled through the controller
controller.pauseSession()
controller.resumeSession()
controller.dismiss()

Placement mechanics

Placement is defined by the object configuration in Vizbl.

Supported mechanics:

  • floor
  • all surfaces
  • wall

The SDK automatically:

  • shows guidance
  • detects surfaces
  • places the object at screen center

Adding objects

Objects are added using ARObjectReference.

val model = ARObjectReference.Single(
    id = ARObjectIdentifier.Tinuuid("your-tinuuid"),
    materialId = null
)

controller.add(model)

Multiple objects

  • calling add(...) again starts a new placement
  • multiple objects can exist in the scene
  • each object can be selected and manipulated independently

Replace vs add

add

  • starts placement
  • adds a new object

replace

controller.replace(
    instanceId = existingId,
    with = newModel
)
  • replaces an existing object
  • keeps its position

Removing objects

controller.remove(instanceId)
controller.removeAll()

Interaction

Configure interaction through ARObjectConfiguration.

allowsTapToSelect = true
allowsMove = true
allowRotation = true

User gestures:

  • tap - select
  • drag - move
  • rotate - rotate

Materials and colors

If an object has materials:

  • the user selects the material directly in AR
  • the SDK handles the UI automatically
  • no additional API calls are required

Scene state

controller.placedObjects
controller.selectedInstanceId
controller.lastAddedInstanceId

Built-in UI and actions

The SDK includes built-in UI for:

  • close
  • add
  • buy
  • QR scanning, if enabled
  • material selection
  • guidance and instructions

You can handle actions via VizblActionHandler.

override fun onAddObjectClick() {}
override fun onBuyClick(url: String, previewUrl: String?) {}
override fun onCloseClick() {}
override fun onDeleteClick() {}
override fun onQRScanned(url: String) {}

Responsibilities

SDK

  • AR rendering
  • placement
  • surface detection
  • user guidance
  • interaction
  • material UI
  • built-in controls

Your app

  • product catalog
  • selecting the object
  • passing tinuuid
  • business logic
  • custom UI

On this page