Releases: DecartAI/decart-android
Releases · DecartAI/decart-android
0.3.0
Upload Progress Callbacks
Track upload progress in real-time when submitting large video files through the Queue API.
Quick Start — Upload Progress
// Simple lambda syntax (UploadProgressListener is a fun interface)
client.queue.submitAndPoll(
model = VideoModels.LUCY_2_V2V,
input = VideoEditInput(
prompt = "Transform into Studio Ghibli anime style",
data = FileInput.fromUri(videoUri),
),
onUploadProgress = { bytesWritten, totalBytes ->
if (totalBytes > 0) {
val percent = (bytesWritten * 100 / totalBytes).toInt()
Log.d("Upload", "Progress: $percent%")
}
}
)
// With submitAndObserve (Flow) — trailing lambda
client.queue.submitAndObserve(model, input) { bytesWritten, totalBytes ->
updateProgressBar(bytesWritten.toFloat() / totalBytes)
}.collect { update ->
when (update) {
is QueueJobResult.InProgress -> showStatus(update.status)
is QueueJobResult.Completed -> saveVideo(update.data)
is QueueJobResult.Failed -> showError(update.error)
}
}What's New
- Upload progress callbacks — New
UploadProgressListenerfun interface withonProgress(bytesWritten, totalBytes), available onsubmit,submitAndPoll, andsubmitAndObserve - Streaming progress tracking — Uses OkHttp
ForwardingSinkpattern to count bytes as they're written to the network, with zero extra buffering - Sample app — Queue tab now shows a
LinearProgressIndicatorwith "Uploading... X%" during file upload
What's Changed
- Add upload progress callbacks for queue API in #2
Full Changelog: 0.2.0...0.3.0
0.2.0
Video Generation
Generate videos from the Decart Android SDK. Submit a video, image, or text prompt - get back a transformed video.
Quick Start — Video-to-Video with lucy-2-v2v
val client = DecartClient(
context = context,
config = DecartClientConfig(apiKey = "your-api-key")
)
val input = VideoEditInput(
prompt = "Transform into Studio Ghibli anime style",
data = FileInput.fromUri(videoUri), // from a file picker
enhancePrompt = true,
)
// Option 1: Simple poll-and-wait
val result = client.queue.submitAndPoll(VideoModels.LUCY_2_V2V, input)
if (result is QueueJobResult.Completed) {
File("output.mp4").writeBytes(result.data)
}
// Option 2: Reactive Flow with progress updates
client.queue.submitAndObserve(VideoModels.LUCY_2_V2V, input).collect { update ->
when (update) {
is QueueJobResult.InProgress -> Log.d("TAG", "Status: ${update.status}")
is QueueJobResult.Completed -> File("output.mp4").writeBytes(update.data)
is QueueJobResult.Failed -> Log.e("TAG", "Failed: ${update.error}")
}
}
client.release()Supported Models
| Model | Type | Input |
|---|---|---|
lucy-2-v2v |
Video Edit | Video + prompt + optional reference image |
lucy-pro-v2v |
Video Edit (Pro) | Video + prompt + optional reference image |
lucy-fast-v2v |
Video Edit (Fast) | Video + prompt + optional reference image |
lucy-restyle-v2v |
Video Restyle | Video + prompt or reference image |
lucy-pro-t2v |
Text to Video | Prompt only (landscape/portrait) |
lucy-pro-i2v |
Image to Video (Pro) | Image + prompt |
lucy-dev-i2v |
Image to Video (Dev) | Image + prompt |
lucy-motion |
Motion Video | Image + trajectory path |
Each model has a dedicated input type (VideoEditInput, VideoRestyleInput, TextToVideoInput, ImageToVideoInput, MotionVideoInput) with built-in validation.
What's New
- Queue API —
submit,status,result,submitAndPoll,submitAndObserve(Kotlin Flow) - Streaming uploads — large videos upload without loading into memory
- Model-adaptive sample app — "Video" tab auto-adjusts UI fields per model
What's Changed
- Add batch video queue support and typed inputs across video models by @AdirAmsalem in #1
Full Changelog: 0.1.0...0.2.0