# AI, Meet App: Enable or Disable Android AppFunctions at runtime

DevFeed: [AI, Meet App: Enable or Disable Android AppFunctions at runtime](<https://devfeed.tech/articles/ai-meet-app-enable-or-disable-android-appfunctions-at-runtime-100950.md>)

Original publisher: [Read original article](<https://proandroiddev.com/ai-meet-app-enable-or-disable-android-appfunctions-at-runtime-77e18ca3ec95?source=rss----c72404660798---4>)

Author: Katie Barnett

Published: 2026-10-26T23:30:41Z

Content type: tutorial

Language: en

Sources: [ProAndroidDev](<https://devfeed.tech/sources/proandroiddev-medium.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [android-permissions](<https://devfeed.tech/topics/android-permissions.md>)

Tags: [2026](<https://devfeed.tech/tags/2026.md>), [ai](<https://devfeed.tech/tags/ai.md>), [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [androiddev](<https://devfeed.tech/tags/androiddev.md>), [annotation](<https://devfeed.tech/tags/annotation.md>), [api](<https://devfeed.tech/tags/api.md>), [consent](<https://devfeed.tech/tags/consent.md>), [feature-toggle](<https://devfeed.tech/tags/feature-toggle.md>), [gemini](<https://devfeed.tech/tags/gemini.md>), [llm](<https://devfeed.tech/tags/llm.md>), [october-2026](<https://devfeed.tech/tags/october-2026.md>), [runtime](<https://devfeed.tech/tags/runtime.md>), [testing](<https://devfeed.tech/tags/testing.md>)

## AI overview

Android AppFunctions can be disabled by default and enabled selectively when conditions are met, such as user consent, a paid feature, or a feature toggle. Set `isEnabled = false` in `@AppFunctionDeclaration`, then use `AppFunctionManager.setAppFunctionEnabled` with each function's identifier to enable or disable it as needed. The setter is a suspend function and must run in a coroutine; `isAppFunctionEnabled` can check the current state. The article says the API was in private preview with trusted testers as of October 2026, so it was not immediately testable in a production app.

## Source excerpt

Now that you have implemented Android AppFunctions, how to conditionally make them available?What a cool droid. Generated with Gemini Nano Banana. If you haven't yet played around with adding Android AppFunctions to your app, check out my blog post to get started, and get testing! Just note, as of writing this article (October 2026), the AppFunctions API is in a private preview with trusted testers, so you are not able to test it out immediately in a production app -- but get your app ready now! Android AppFunctions are a great idea to enable on device models to interact with your app, but there are several reasons why you may not want them enabled all the time: Require user consent: Before sharing private data with the LLM, you might want to ask the user first, giving them a chance to decide whether to share it and how much to share. Feature toggle: Extra protection can sometimes be good. You can put some or all of your AppFunctions behind a feature toggle and disable them remotely if something goes wrong. Pro feature: If implementing your AppFunction features has been a significant investment in time for you, you may not want to give all users access for free! If you have a pro or paid version of your app, you can enable the functions for them, and disable them for free users. No matter what the reason, there is an easy way to do this! Disabling AppFunctions by default It all goes back to the @AppFunctionDeclaration annotation. We first saw this when writing our AppFunctions (where we had to set isDescribedByKDoc = true to use our KDoc to describe the function). It has another parameter isEnabled. This is true by default, but if we instead set this to false then we can enable and disable the functions at runtime. So as an example: https://medium.com/media/a8e0c7f72f9c19a97061a4f7a0a364c4/href When disabling the functions, we can verify this in the testing app: Note the 'Disabled' label next to each function. Now that we have them disabled, how do we re-enable them