๐Ÿง  Android AI Projects and Production

Offline AI Features and Device Compatibility

Your AI feature works perfectly on a flagship phone on office Wi-Fi. But many users have mid-range devices, limited storage and patchy connectivity. Designing for that reality means detecting capability, delivering models carefully, and offering tiered experiences.

โœ๏ธ Yunok Tech ๐Ÿ“… Updated โฑ 3 min read ๐ŸŽฏ Intermediate
On this page
  1. Tiered experiences
  2. Detect capability
  3. Model downloads
  4. Gating your own models
  5. Designing for offline
  6. Testing across devices
  7. Frequently asked questions
  8. Conclusion

Android runs on thousands of device models. An AI feature has to answer three questions at runtime: can this device run the model, is the model present, and is the network available if we need the cloud? The answers decide which experience the user gets.

Tiered experiences

Choosing an AI tier at runtime Check whether the on-device model is available; if yes, use on-device AI, which also works offline. If not, check network and policy; if online and allowed, use cloud AI. Otherwise use a non-AI fallback such as manual tools or a queued request for later. On-device modelavailable? Tier 1: on-device Online +cloud allowed? Tier 2: cloud Tier 3: non-AI fallback
Decide the tier per request, not once at install: availability and connectivity change.

Detect capability

AiCapabilities.ktKotlin
data class AiCapabilities(
    val onDevice: OnDeviceStatus,
    val online: Boolean,
    val lowRam: Boolean,
)

enum class OnDeviceStatus { AVAILABLE, DOWNLOADABLE, DOWNLOADING, UNAVAILABLE }

class CapabilityChecker(
    private val context: Context,
    private val summarizer: OnDeviceSummarizer,      // wraps ML Kit GenAI checkFeatureStatus()
) {
    suspend fun check(): AiCapabilities {
        val am = context.getSystemService(ActivityManager::class.java)
        val cm = context.getSystemService(ConnectivityManager::class.java)
        val caps = cm.getNetworkCapabilities(cm.activeNetwork)
        return AiCapabilities(
            onDevice = summarizer.status(),
            online = caps?.hasCapability(NetworkCapabilities.NET_CAPABILITY_VALIDATED) == true,
            lowRam = am.isLowRamDevice,
        )
    }
}

For Gemini Nano, always use the API's own status check (ML Kit GenAI's checkFeatureStatus()) instead of hard-coding device lists. Supported devices change over time.

Model downloads

  • Download only when the user is likely to use the feature, preferably on unmetered networks.
  • Show progress and size, and allow cancel.
  • Handle storage-full and interrupted downloads, and verify checksums for your own model files.
  • Use WorkManager for large downloads with constraints. See WorkManager.

Gating your own models

SignalUse
isLowRamDevice, total RAMSkip large LLMs on low-memory devices
Free storageCheck before downloading models
API level, ABIEnsure runtime and native library support
Benchmark on first runMeasure tokens/second; disable if too slow
Remote configDisable for problematic device models without an app update

Designing for offline

  • On-device first for features users need anywhere (dictation, translation, OCR).
  • Queue cloud requests for non-urgent work (summarise later) and notify when done.
  • Be explicit in UI: "Summaries need internet on this device" is better than a spinner that fails.
Choose the path per requestKotlin
suspend fun summarize(text: String): SummaryResult {
    val caps = capabilityChecker.check()
    return when {
        caps.onDevice == OnDeviceStatus.AVAILABLE && text.length < ON_DEVICE_CHAR_LIMIT ->
            SummaryResult.Ok(onDevice.summarize(text), source = Source.ON_DEVICE)
        caps.online && settings.cloudAllowed ->
            SummaryResult.Ok(cloud.summarize(text), source = Source.CLOUD)
        else -> SummaryResult.Unavailable(reason = if (!caps.online) "offline" else "not supported")
    }
}

Testing across devices

  • Test on at least one low-end and one mid-range device, not just flagships.
  • Test airplane mode, flaky networks and low storage.
  • Use Firebase Test Lab or device farms for broad coverage.
  • Log tier selection (without content) to see real-world availability. See Monitoring AI.

Frequently asked questions

Can I make Gemini Nano available on unsupported devices?

No. Use the cloud or your own smaller model through LiteRT-LM as alternatives.

Should I hide AI features on unsupported devices?

Hide them if no tier works. Otherwise show the feature with the available tier and clear messaging.

Conclusion

Design AI features in tiers: on-device when available, cloud when online and allowed, and a non-AI fallback otherwise. Detect capability with official status APIs, download models carefully, and test on real low-end devices and offline.

Next step: integrate other cloud providers safely with OpenAI API Integration Patterns for Android.

Official references

๐Ÿ“ฑ Apps built by Yunok Tech

Real Android apps on Google Play, free to download.

See all our apps โ†’

Ready to build real Android applications?

Every AI feature still runs inside an Android app that has to be fast, reliable and well structured. Strengthen the Kotlin, Jetpack Compose and architecture skills that AI integrations depend on, then apply these AI concepts with confidence.

Move beyond theory and strengthen your Android development skills with Yunoktech's Android course. Learn core concepts, practical implementation, modern Android development techniques, and the reasoning behind building maintainable applications.

Explore the Android course and take your next step as an Android developer.

Share: LinkedIn X / Twitter WhatsApp