A powerful Android application designed to facilitate launching applications on specific displays in multi-screen environments.
ScreenMaster enables users to easily manage and launch applications across multiple displays connected to an Android device. Perfect for devices with external monitors, presentation setups, or any multi-screen configuration.
- Display Discovery: Automatically detects and lists all available displays/screens
- Detailed Display Information: View resolution, refresh rate, density, and display ID for each screen
- Display State Monitoring: Real-time monitoring of display power state (ON/OFF/DOZE/etc.) with color-coded indicators
- Screen Timeout Information: Shows the system-wide screen timeout setting in the app bar
- App Launcher: Browse all installed launchable applications
- Multi-Screen Support: Launch any app on any connected display
- Launch Confirmation: Toast notification confirms app launch with display name and ID
- Modern UI: Built with Jetpack Compose and Material Design 3
- Intuitive Navigation: Simple two-step process to launch apps on specific screens
- Displays all available screens with detailed information
- Default display is marked with a star icon
- Shows resolution, refresh rate, and density for each screen
- Lists all launchable applications
- Shows app icons, names, and package names
- Tap to launch on the selected display
- Minimum SDK: Android 8.0 (API 26)
- Target SDK: Android 15 (API 36)
- Compile SDK: Android 15 (API 36)
- Kotlin: 2.0.21
- Android Gradle Plugin: 8.11.2
The app requires the following permission:
QUERY_ALL_PACKAGES: Required to discover and list all installed launchable applications
Important: Android does not provide public APIs to control display power states. The DisplayManager class can only:
- Monitor display state changes
- Get display properties
- Control brightness
- Create virtual displays
It cannot turn displays on or off programmatically. To control display power, you would need:
- Root access and shell commands
- System-level app with platform signature
- Device-specific manufacturer APIs (if available)
This app monitors display states but does not control them, as this functionality is not available through Android's public API.
- Launch ScreenMaster: Open the app to see the list of available displays
- Select a Display: Tap on any display card to choose it as the target screen
- Choose an App: Browse the list of installed apps and tap one to launch
- Confirmation: A toast message confirms the app launch with the display name and ID
- View Display State: Each display shows its current power state with color coding
- Blue text indicates the display is active (ON, DOZE, VR, etc.)
- Red text indicates the display is inactive (OFF)
- Supported States: ON, OFF, DOZE, DOZE_SUSPEND, VR, ON_SUSPEND, UNKNOWN
- Screen Timeout: The system-wide screen timeout setting is displayed in the app bar
- Shows how long before displays turn off due to inactivity
- Note: This is a system-wide setting, not per-display
- UI Layer: Jetpack Compose with Material Design 3
- Navigation: Jetpack Navigation Compose
- Display Management: Android DisplayManager API
- Package Management: Android PackageManager API
app/src/main/java/cc/inoki/screenmaster/
├── MainActivity.kt
├── helper/
│ ├── AppHelper.kt # Manages app discovery and launching
│ └── DisplayHelper.kt # Manages display detection
├── model/
│ ├── AppInfo.kt # Data model for applications
│ └── DisplayInfo.kt # Data model for displays
├── navigation/
│ └── AppNavigation.kt # Navigation configuration
├── ui/
│ ├── screen/
│ │ ├── AppListScreen.kt # App selection screen
│ │ └── ScreenListScreen.kt # Display selection screen
│ └── theme/ # Material Design 3 theme
Provides access to display information using Android's DisplayManager and Settings:
getAllDisplays(): Returns list of all available displays with their current stategetDisplay(displayId): Retrieves specific display by IDisDisplayOn(displayId): Checks if a display is currently powered ongetDisplayStateString(displayId): Returns detailed state string (ON/OFF/DOZE/etc.)getScreenTimeout(): Returns the system-wide screen timeout in millisecondsgetScreenTimeoutFormatted(): Returns formatted screen timeout (e.g., "30s", "2m", "5m 30s")
Manages application discovery and launching:
getLaunchableApps(): Returns all apps with launcher activitieslaunchApp(packageName, displayId): Launches app on specified display
- Clone or download the project
- Open Android Studio
- Select "Open an existing project"
- Navigate to the ScreenMaster directory
- Wait for Gradle sync to complete
- Click "Run" or press Shift+F10
# Build debug APK
./gradlew assembleDebug
# Install on connected device
./gradlew installDebug
# Build and run
./gradlew installDebug
adb shell am start -n cc.inoki.screenmaster/.MainActivity- AndroidX Core KTX
- AndroidX Lifecycle Runtime KTX
- AndroidX Activity Compose
- Jetpack Compose BOM
- Jetpack Compose UI
- Material Design 3
- Navigation Compose
See gradle/libs.versions.toml for specific versions.
The app uses Android's native multi-display APIs:
DisplayManagerto enumerate displaysActivityOptions.setLaunchDisplayId()to target specific displaysFLAG_ACTIVITY_LAUNCH_ADJACENTfor multi-window scenarios
This app works best on:
- Android devices with external display support
- Tablets with secondary displays
- Devices in desktop mode (Samsung DeX, etc.)
- Android TV boxes with multiple HDMI outputs
- Foldable devices with multiple screens
The app is structured for easy extension:
- Add new screens in
ui/screen/ - Add new routes in
navigation/AppNavigation.kt - Create helper classes in
helper/for new functionality - Define data models in
model/
The project follows the official Kotlin coding conventions and uses:
- Kotlin 2.0.21
- Jetpack Compose for UI
- Material Design 3 guidelines
- Ensure the external display is properly connected
- Some apps may not support secondary displays
- Check that the display is active in system settings
- Verify external displays are connected and recognized by Android
- Some devices may require developer options enabled
- Check cable connections and display compatibility
- The app requests
QUERY_ALL_PACKAGESwhich may require user consent on some devices - This permission is necessary to list all installed apps
- The app can monitor display states (ON/OFF/DOZE/etc.) using Android's public Display API
- Display power control is NOT available through public Android APIs
- State information is read-only and refreshes when you navigate back to the screen list
This project is provided as-is for educational and personal use.
Contributions are welcome! Please feel free to submit issues or pull requests.
- Added display state monitoring (ON/OFF/DOZE/etc. detection)
- Added detailed display state information
- Added screen timeout display in the app bar
- Added toast notifications for app launches with display ID
- Improved display card UI with state indicators
- Documented Android API limitations for display power control
- Initial release
- Display detection and listing
- App discovery and launching
- Multi-display support
- Material Design 3 UI