Android Troubleshooting
This document provides solutions to common issues encountered while loading GlamAR SDK output images in Android integrations.
Common Issues and Solutions
Image URL Not Loading
If the API returns a delivery.pixelbin.io image URL but the image does not render, configure your image loader to send an empty Referer request header.
For Glide:
import com.bumptech.glide.Glide
import com.bumptech.glide.load.model.GlideUrl
import com.bumptech.glide.load.model.LazyHeaders
val glideUrl = GlideUrl(
imageUrl,
LazyHeaders.Builder()
.addHeader("Referer", "")
.build()
)
Glide.with(imageView)
.load(glideUrl)
.into(imageView)
For Coil:
val request = ImageRequest.Builder(context)
.data(imageUrl)
.addHeader("Referer", "")
.target(imageView)
.build()
imageLoader.enqueue(request)
Native Android image requests do not use the browser referrerPolicy prop. Use request headers in the image loading library instead.