How kai-xin-02/micswitch works
MicSwitch is a discontinued Android app that selects two voice apps and exposes a floating control intended to toggle their microphone permissions. MainActivity checks privileged access, gathers app choices, and starts FloatingService; tapping its bubble invokes MicController, which delegates permission changes. The README describes root/Shizuku detection and overlay access, while the sampled source shows the implementation. Android’s audio model means these permission changes do not transfer an active microphone session.
Main entry points: MainActivity.kt App setup · PermissionHandler.kt Permission handler · MicDetector.kt Voice app detection · FloatingService.kt Floating service
Components 11
App workflow
- App setup
app/src/main/java/ui/MainActivity.kt - Voice app detection
app/src/main/java/core/MicDetector.kt
Switch control
- Mic controller
app/src/main/java/core/MicController.kt - Floating service
app/src/main/java/service/FloatingService.kt
System access
- Permission handler
app/src/main/java/core/PermissionHandler.kt
Other components
- User
- Android package manager
- Audio diagnostics
- Android overlay system
- Root shell
- Shizuku
Connections 13
- User → App setup: selects apps
- App setup → Android package manager: queries apps
- App setup → Permission handler: checks access
- App setup → Voice app detection: requests detection
- Voice app detection → Audio diagnostics: reads active audio
- Voice app detection → Android package manager: checks installed apps
- App setup → Mic controller: sets app pair
- App setup → Floating service: starts service
- Floating service → Android overlay system: adds bubble
- Floating service → Mic controller: requests switch
- Mic controller → Permission handler: revokes and grants
- Permission handler → Root shell: runs commands
- Permission handler → Shizuku: checks and runs commands