# 33795ggr/micts-killer architecture

> Architecture diagram of the GitHub repository 33795ggr/micts-killer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/33795ggr/micts-killer
- Repository: https://github.com/33795ggr/micts-killer

## Overview

Google Lens Shortcut is an Android utility that captures the current screen and hands the image to Google Lens. Its documented primary workflow is granting screen-capture permission once, adding a Quick Settings tile, then tapping it to capture and search; users can adjust capture delay. The excerpts show two tile services and a separate floating-button route, plus permission setup and boot-time startup support. Unsampled LensLauncher, UI, and lifecycle details are represented only where documented or evidenced by the source index.

Main entry points: [`app/src/main/java/com/lensshortcut/vivo/ScreenshotService.kt`](https://github.com/33795ggr/micts-killer/blob/main/app/src/main/java/com/lensshortcut/vivo/ScreenshotService.kt) (Capture service), [`app/src/main/java/com/lensshortcut/vivo/MainActivity.kt`](https://github.com/33795ggr/micts-killer/blob/main/app/src/main/java/com/lensshortcut/vivo/MainActivity.kt) (Setup and delay), [`app/src/main/java/com/lensshortcut/vivo/MediaProjectionHolder.kt`](https://github.com/33795ggr/micts-killer/blob/main/app/src/main/java/com/lensshortcut/vivo/MediaProjectionHolder.kt) (Projection state), [`app/src/main/java/com/lensshortcut/vivo/GoogleLensTileService.kt`](https://github.com/33795ggr/micts-killer/blob/main/app/src/main/java/com/lensshortcut/vivo/GoogleLensTileService.kt) (Lens tile)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User entry points"]
  node_google_tile["Lens tile"]
  node_search_tile["Search tile"]
  node_floating["Floating shortcut"]
end

subgraph group_capture["Screen capture"]
  node_projection_holder["Projection state"]
  node_screenshot["Capture service"]
end

subgraph group_setup["Setup and lifecycle"]
  node_main_activity["Setup and delay<br/>[MainActivity.kt]"]
  node_permissions["Permission checks"]
  node_boot["Boot restart<br/>[BootReceiver.kt]"]
  node_application["App initialization<br/>[MainApplication.kt]"]
end

subgraph group_handoff["Lens handoff"]
  node_lens["Google Lens"]
  node_lens_launcher["Lens launch helper<br/>[LensLauncher.kt]"]
end

node_user(("Phone user"))
node_android_settings["Android settings"]

node_user -->|"taps tile"| node_google_tile
node_google_tile -->|"requests capture"| node_screenshot
node_user -->|"taps tile"| node_search_tile
node_search_tile -->|"requests capture"| node_screenshot
node_user -->|"taps shortcut"| node_floating
node_main_activity -->|"starts capture"| node_screenshot
node_screenshot -->|"stores projection"| node_projection_holder
node_google_tile -->|"checks projection"| node_projection_holder
node_search_tile -->|"checks projection"| node_projection_holder
node_main_activity -->|"checks status"| node_projection_holder
node_screenshot -->|"shares screenshot"| node_lens
node_floating -->|"opens Lens"| node_lens
node_user -->|"grants capture"| node_main_activity
node_user -->|"sets permissions"| node_android_settings
node_android_settings -.->|"permission state"| node_permissions
node_boot -->|"checks overlay"| node_permissions
node_boot -->|"starts service"| node_floating
node_application -->|"configures channel"| node_screenshot
node_main_activity -->|"configures delay"| node_android_settings
node_lens_launcher -.->|"launches app"| node_lens

click node_google_tile "https://github.com/33795ggr/micts-killer/blob/main/app/src/main/java/com/lensshortcut/vivo/GoogleLensTileService.kt"
click node_search_tile "https://github.com/33795ggr/micts-killer/blob/main/app/src/main/java/com/lensshortcut/vivo/SearchTileService.kt"
click node_floating "https://github.com/33795ggr/micts-killer/blob/main/app/src/main/java/com/lensshortcut/vivo/FloatingButtonService.kt"
click node_main_activity "https://github.com/33795ggr/micts-killer/blob/main/app/src/main/java/com/lensshortcut/vivo/MainActivity.kt"
click node_permissions "https://github.com/33795ggr/micts-killer/blob/main/app/src/main/java/com/lensshortcut/vivo/PermissionManager.kt"
click node_boot "https://github.com/33795ggr/micts-killer/blob/main/app/src/main/java/com/lensshortcut/vivo/BootReceiver.kt"
click node_application "https://github.com/33795ggr/micts-killer/blob/main/app/src/main/java/com/lensshortcut/vivo/MainApplication.kt"
click node_projection_holder "https://github.com/33795ggr/micts-killer/blob/main/app/src/main/java/com/lensshortcut/vivo/MediaProjectionHolder.kt"
click node_screenshot "https://github.com/33795ggr/micts-killer/blob/main/app/src/main/java/com/lensshortcut/vivo/ScreenshotService.kt"
click node_lens_launcher "https://github.com/33795ggr/micts-killer/blob/main/app/src/main/java/com/lensshortcut/vivo/LensLauncher.kt"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_google_tile,node_search_tile,node_floating,node_user toneBlue
class node_projection_holder,node_screenshot toneAmber
class node_main_activity,node_permissions,node_boot,node_application toneMint
class node_lens,node_lens_launcher toneRose
class node_android_settings toneIndigo
```

## Components

### User entry points

- [Lens tile](https://github.com/33795ggr/micts-killer/blob/main/app/src/main/java/com/lensshortcut/vivo/GoogleLensTileService.kt): `app/src/main/java/com/lensshortcut/vivo/GoogleLensTileService.kt`
- [Search tile](https://github.com/33795ggr/micts-killer/blob/main/app/src/main/java/com/lensshortcut/vivo/SearchTileService.kt): `app/src/main/java/com/lensshortcut/vivo/SearchTileService.kt`
- [Floating shortcut](https://github.com/33795ggr/micts-killer/blob/main/app/src/main/java/com/lensshortcut/vivo/FloatingButtonService.kt): `app/src/main/java/com/lensshortcut/vivo/FloatingButtonService.kt`

### Screen capture

- [Projection state](https://github.com/33795ggr/micts-killer/blob/main/app/src/main/java/com/lensshortcut/vivo/MediaProjectionHolder.kt): `app/src/main/java/com/lensshortcut/vivo/MediaProjectionHolder.kt`
- [Capture service](https://github.com/33795ggr/micts-killer/blob/main/app/src/main/java/com/lensshortcut/vivo/ScreenshotService.kt): `app/src/main/java/com/lensshortcut/vivo/ScreenshotService.kt`

### Setup and lifecycle

- [Setup and delay](https://github.com/33795ggr/micts-killer/blob/main/app/src/main/java/com/lensshortcut/vivo/MainActivity.kt): `app/src/main/java/com/lensshortcut/vivo/MainActivity.kt`
- [Permission checks](https://github.com/33795ggr/micts-killer/blob/main/app/src/main/java/com/lensshortcut/vivo/PermissionManager.kt): `app/src/main/java/com/lensshortcut/vivo/PermissionManager.kt`
- [Boot restart](https://github.com/33795ggr/micts-killer/blob/main/app/src/main/java/com/lensshortcut/vivo/BootReceiver.kt): `app/src/main/java/com/lensshortcut/vivo/BootReceiver.kt`
- [App initialization](https://github.com/33795ggr/micts-killer/blob/main/app/src/main/java/com/lensshortcut/vivo/MainApplication.kt): `app/src/main/java/com/lensshortcut/vivo/MainApplication.kt`

### Lens handoff

- **Google Lens**
- [Lens launch helper](https://github.com/33795ggr/micts-killer/blob/main/app/src/main/java/com/lensshortcut/vivo/LensLauncher.kt): `app/src/main/java/com/lensshortcut/vivo/LensLauncher.kt`

### Other components

- **Phone user**
- **Android settings**

## Connections

- Phone user → Lens tile: taps tile (evidence: `README.md`)
- Lens tile → Capture service: requests capture (evidence: `app/src/main/java/com/lensshortcut/vivo/GoogleLensTileService.kt`)
- Phone user → Search tile: taps tile (evidence: `README.md`)
- Search tile → Capture service: requests capture (evidence: `app/src/main/java/com/lensshortcut/vivo/SearchTileService.kt`)
- Phone user → Floating shortcut: taps shortcut (evidence: `app/src/main/java/com/lensshortcut/vivo/FloatingButtonService.kt`)
- Setup and delay → Capture service: starts capture (evidence: `app/src/main/java/com/lensshortcut/vivo/MainActivity.kt`)
- Capture service → Projection state: stores projection (evidence: `app/src/main/java/com/lensshortcut/vivo/ScreenshotService.kt`)
- Lens tile → Projection state: checks projection (evidence: `app/src/main/java/com/lensshortcut/vivo/GoogleLensTileService.kt`)
- Search tile → Projection state: checks projection (evidence: `app/src/main/java/com/lensshortcut/vivo/SearchTileService.kt`)
- Setup and delay → Projection state: checks status (evidence: `app/src/main/java/com/lensshortcut/vivo/MainActivity.kt`)
- Capture service → Google Lens: shares screenshot (evidence: `app/src/main/java/com/lensshortcut/vivo/ScreenshotService.kt`)
- Floating shortcut → Google Lens: opens Lens (evidence: `app/src/main/java/com/lensshortcut/vivo/FloatingButtonService.kt`)
- Phone user → Setup and delay: grants capture (evidence: `README.md`)
- Phone user → Android settings: sets permissions (evidence: `README.md`)
- Android settings → Permission checks: permission state
- Boot restart → Permission checks: checks overlay (evidence: `app/src/main/java/com/lensshortcut/vivo/BootReceiver.kt`)
- Boot restart → Floating shortcut: starts service (evidence: `app/src/main/java/com/lensshortcut/vivo/BootReceiver.kt`)
- App initialization → Capture service: configures channel (evidence: `app/src/main/java/com/lensshortcut/vivo/ScreenshotService.kt`)
- Setup and delay → Android settings: configures delay (evidence: `README.md`)
- Lens launch helper → Google Lens: launches app
