Android ROLE_ASSISTANT settings cleared on APK reinstall — affects both custom and official Claude app

Resolved 💬 2 comments Opened Mar 31, 2026 by kjaiswal Closed Apr 4, 2026

Summary

When building an Android app that registers as a digital assistant via ROLE_ASSISTANT (replacing Gemini), the assistant and voice_interaction_service Secure Settings are cleared on every APK reinstall. This makes the assistant unusable via long-press power button until manually restored via ADB.

This affects both custom assistant apps and the official Claude Android app — neither can reliably stay as the default assistant across updates.

Steps to Reproduce

  1. Build an Android app with VoiceInteractionService and ROLE_ASSISTANT registration
  2. Set it as the default assistant (via Settings or RoleManager)
  3. Reinstall the APK (adb install -r)
  4. Long-press the power button — nothing happens (Gemini takes over, or no assistant responds)

Expected Behavior

The assistant setting should persist across reinstalls of the same package, or at minimum, the system should prompt the user to re-select.

Actual Behavior

Secure Settings assistant and voice_interaction_service are silently cleared. The only fix is:

adb shell settings put secure assistant com.package.name/.AssistActivity
adb shell settings put secure voice_interaction_service com.package.name/.VoiceInteractionService

Context

I built an open-source voice assistant that pipes audio through NVIDIA Parakeet STT → claude --print → macOS TTS, replacing Gemini on a Pixel 10: https://github.com/kjaiswal/claude-voice-assistant

While testing, I noticed the official Claude Android app has the same issue — it also can't stay as the default assistant after updates. This appears to be an Android platform behavior, but it would be great if:

  1. The official Claude app documented this workaround
  2. Claude Code gained a built-in voice assistant mode (e.g., claude --voice or a companion mobile app) that handles the assistant registration properly

Workaround

Created a deploy.sh script that auto-restores settings after each install:

adb install -r app.apk
adb shell settings put secure assistant com.package/.AssistActivity
adb shell settings put secure voice_interaction_service com.package/.VoiceInteractionService
adb shell settings put secure assist_gesture_enabled 1

Environment

  • Android 16 (Pixel 10 Pro Fold)
  • Gesture navigation mode
  • Claude Code CLI v1.x on macOS (backend)

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗