3D Visualisation SDK
Android
Embed the Reliefs 3D product viewer in an Android app.
Make sure you've read the Prerequisites first — you'll need
your public key (pk_) and a product UUID.
Add the Reliefs SDK
Add the Reliefs dependency to your project (Gradle).
Configure your API key
On startup, initialize the SDK with your key, the base URL, and your package name.
import com.reliefs.sdk.ReliefsSDK
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
ReliefsSDK.configure(
apiKey = "pk_live_your_key",
baseUrl = "https://api.reliefsapp.com",
appId = "com.your.app" // package name → allowlist it under App IDs
)
}
}Register your package name
Add your Android package name (e.g. com.your.app) to Allowed app IDs on the key,
or requests from the app are rejected.
Show the 3D viewer
Open the viewer directly, or place a ReliefsButtonView.
import com.reliefs.sdk.ReliefsSDK
// Option 1 — open the viewer directly
ReliefsSDK.showProduct(context = this, productUuid = "PRODUCT_UUID")
// Option 2 — button with branding (XML: <com.reliefs.sdk.ReliefsButtonView ... />)
binding.reliefsBtn.productUuid = "PRODUCT_UUID"