跳到正文

v-modal

vmodal_sdk_android

Video Search SDK for Android Kotlin. Integrate in any video app

README 已保存到本站,可直接阅读

Documentation snapshot

README 快照

这篇是英文原文

下面正文是项目自己的英文 README。想读全文就用浏览器自带的整页翻译: Chrome / Edge 点地址栏右侧的翻译图标,或用右键菜单里的「翻译成中文」; 手机浏览器一般在菜单里。

本页保存的是公开项目资料快照,阅读过程不需要连接 GitHub。

    

V-Modal AI for Android Give your Android app a Visual Memory for video and images Upload video. Find moments by image-semantic meaning or imagery.Build the experience in Kotlin, Compose, Views, coroutines, and the Android tools you already know.

Turn every video library into an experience Android users can explore.

V-Modal AI Discord V-Modal AI Website

Build the feature people remember

V-Modal AI brings multimodal video search and mobile-friendly uploads to Kotlin with a small, typed API. Your app owns the screens and lifecycle; the SDK handles the gateway, request models, response parsing, signed upload streams, progress, and cancellation.

Your Android experienceVModal gives you
“Find the red car entering the parking lot”Semantic video and image search
Find a visual moment by meaningFixed image-semantic search
Upload from the system photo pickerStreaming content:// URI support
A cancel action that really cancelsCold upload Flow plus callback UploadHandle compatibility
Compose, Views, or your own design systemA UI-free Kotlin client
Existing authentication and DIApp-owned runtime credentials—no login UI imposed
Work that survives beyond one screenCoroutineWorker plus cancellation-aware upload Flow

Prompt to start

Copy this prompt into your coding agent:

Download, install, set up, run, and validate the VModal Android SDK and its
complete demo application.

1. Download the GitHub repository:

     git clone https://github.com/v-modal/vmodal_sdk_android
     cd vmodal_sdk_android

   If the repository already exists, reuse the current checkout and preserve
   unrelated local changes.

2. Install and verify the SDK toolchain:

     cd uinterface/sdk_android
     bash install.sh install
     bash install.sh check

   Use the checked-in Gradle wrapper. Do not create another environment or
   replace the reviewed wrapper.

3. Set up Android:

   - Install Android Studio and Android SDK 34.
   - Use JDK 17.
   - Set ANDROID_HOME or ANDROID_SDK_ROOT when building from the command line.
   - Start an unlocked Android 7.0/API 24+ emulator or connect a device.
   - Supply the VModal API key only at runtime in the demo application. Never
     save it in source, resources, Gradle properties, local.properties, logs,
     or the manifest.

4. Run the complete demo application:

   Open `uinterface/sdk_android/examples/03_fullapp/` in Android Studio, allow
   Gradle to sync, select the `app` run configuration, and run
   **VModal Full Search** on the API 24+ emulator or device.

   Also build and install it from the command line:

     cd examples/03_fullapp
     ./gradlew --no-daemon :app:testDebugUnitTest :app:assembleDebug
     adb devices
     ./gradlew --no-daemon :app:installDebug

Set up and validate `uinterface/sdk_android/examples/03_fullapp/` as a complete
Android example for the local VModal Android SDK.

Before editing, inspect the existing SDK, full-app example, starter snippets,
scripts, tests, and documentation. Reuse the current implementation and improve
it in place; do not replace working components or duplicate SDK logic inside
the example.

Requirements:
- Keep the default Gradle project dependency on the SDK at `../..`; preserve
  the existing optional Maven Local verification path.
- Use Kotlin, Jetpack Compose, coroutines, `StateFlow`, and lifecycle-aware
  state collection with Java 17, compile SDK 34, and minimum SDK 24.
- Provide a simple runnable flow for an API key supplied at runtime: configure
  the client, call `auth.me()`, list video collections, upload a selected
  `content://` URI or bundled sample with progress and cancellation,
  create/check an image index, search the selected collection, resolve result
  images in one bulk request, and display them in a responsive grid.
- Use the coroutine facade from caller-owned scopes and collect UI state with
  lifecycle awareness; do not hard-code a main dispatcher inside SDK calls.
  Keep collection, stream, index-job, search-hit, and resolved-image contracts
  explicitly coupled so data from one scope cannot appear under another.
- Keep credentials in memory only. Never hard-code, persist, print, or commit
  API keys, bearer tokens, or presigned URLs. Do not attach the VModal bearer
  token when loading presigned image URLs.
- Use Android's Storage Access Framework for user-selected videos; do not add
  broad storage permissions or depend on device filesystem paths.
- Keep the example beginner-friendly and small. Use the public typed SDK API,
  preserve request/response contracts, handle loading, empty, error, and
  cleanup states, and cancel/clear SDK resources when the ViewModel is cleared
  or the authenticated identity changes.
- Update `examples/03_fullapp/README.md` when setup steps or behavior change.
- Use the repository scripts and pinned Gradle/JDK setup.

From `uinterface/sdk_android`, verify the SDK with:

  bash install.sh check
  bash test.sh test
  bash run.sh sim

Then verify the full app with:

  cd examples/03_fullapp
  ./gradlew --no-daemon :app:testDebugUnitTest :app:assembleDebug

With an unlocked API 24+ emulator or device available, also run
`./gradlew --no-daemon :app:connectedDebugAndroidTest`. Report the files
changed, validation results, and any device or platform check that could not be
run with the exact blocker. Do not claim a live API flow passed unless it was
tested with a valid runtime key.

Guidelines

Start with the Android integration cookbook for the capability map, one coupled upload → index → search recipe, Compose and classic lifecycle patterns, content://, WorkManager, typed failures, and account-switch cleanup. Demo UI remains application-owned: the SDK publishes no navigation, screens, themes, accessibility policy, or design system.

[!TIP] Building a mobile video experience? Get a free beta API key and join the VModal Discord.

SDK docs: v-modal.github.io/vmodal_sdk_android/

We would love to help you ship it.

Start building

For new content flows, bind upload, search, asset, index, and deletion calls to one immutable project, collection, and stream:

import com.vmodal.sdk.VModal

val content = VModal.configure(
    projectId = "food_app",
    apiKey = apiKeyLoadedByYourApp,
).scope(
    collectionName = "user_123",
    streamName = "uploads",
)

val results = content.search("the cyclist crossing the bridge at sunset")

Continue with the technical introduction for installation, runtime credentials, search, uploads, lifecycle integration, network behavior, the supported toolchain, and local validation.

Choose a developer use case

If you want to…Start here
Learn one API operation at a timeKotlin starter examples
Build a picker → upload → index → search screenUpload and search app
Validate the complete flow stage by stageFull search application
Build a local street-video search product flowFramebase Compose application
Design global, per-user, multi-stream, or catalog indexesIndex organization examples

Explore the SDK


Learn More About VModal

Explore the full platform and developer resources:

  • VModal — the official home of VModal multimodal video and image search.
  • VModal for Developers — API docs, SDKs, and integration guides for building on VModal.
  • VModal AI — learn how VModal AI powers semantic search across video, speech, text, and imagery.

Get started today at www.v-modal.com, read the developer documentation, and discover the technology behind VModal AI.


  

  

  

Build video experiences people can search, not just scroll. Built for Android developers by VModal. Licensed under the Apache License 2.0.

Android and the Android robot are trademarks of Google LLC. Asset attribution is documented in assets/README.md.

Official distribution

获取与安装

暂未发现可确认的官方软件包地址

当前 README 快照没有出现 npm、PyPI、Crates.io、pub.dev 等官方包页链接。本站不会根据仓库名称猜测下载地址。

本站不托管项目文件;需要安装时,请以项目维护者发布的官方文档为准。

使用前核验

本站保存公开资料用于阅读,不代表安全审计或功能背书。安装前请核对许可证、依赖来源和发布签名,不要直接运行来源不明的二进制文件或高权限脚本。