App Management

  • Using MDM/ADB to Force Install Apk on Android Devices
  • FOTA Update for Android: Simpler Software Updates
  • How to Uninstall Chrome on Android
  • How to Delete Pre-installed Apps on Android
  • Detailed Guide: Allow App Installations from Unknown Sources
AirDroid Business

Award-winning MDM Solution

Try It Free

Android Keep Screen on for Certain Apps [Comprehensive Guide]

Maverick Updated on Mar 21, 2025 Filed to: App Management

Are you an e-book lover, a gaming enthusiast, or a business person who needs to keep the screen on for specific apps to avoid distractions?

If yes, this article will prove very informative as we will discuss multiple methods for Android keep screen on for certain apps.

Each method has unique usage and compatibility requirements, features, and limitations from general users to IT experts.

  • 1 : How to Set Android Keep Screen On for Certain Apps?
    • 1.1 : Native API or In-App Code Configuration
    • 1.2 : Setup with Third-Party Application
    • 1.3 : Xposed/LSPosed
    • 1.4 : Brand-Specific System Settings
    • 1.5 : MDM Solution for Businesseshot-tip
  • 2 : Potential Issues and Considerations

How to Set Android Keep Screen On for Certain Apps?

1Way 1. Native API or In-App Code Configuration

Recommend for: This method is suitable for app developers as they have permissions to make desired changes in the source code. Moreover the steps to perform this method might be confusing for general users but easy to understand for person with the IT background.

💡Implementation process

FLAG_KEEP_SCREEN_ON

Keeping the screen turned on is automatically managed with APIs on some Android devices. For devices that lack such APIs, we need to implement manual setups using FLAG_KEEP_SCREEN_ON function to set keep screen on. Here are the detailed steps to implement it:

  1. Step 1:
    Launch Android Studio
  2. Launch it and open a project of the app that you want to set for screen always on.
  1. Step 2:
    Activity File
  2. Navigate to the activity where you want to keep it on. Find it in the ‘JAVA’ or ‘Kotlin’ directory beneath the app’s package name.
  1. Step 3:
    Enter the Code
  2. Set the ‘FLAG_KEEP_SCREEN_ON’ feature using the code:

    For Java, enter:

    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)

    For Kotlint, enter:

    window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)

  1. Step 4:
    Testing
  2. Try out the app on your device to ensure that the screen keeps on until the app is running in the background.
Note : This flag can only be added in an activity. It does not work when added in a service or app components. You can also use the ‘android:keepScreenOn="true"’ attribute in your XML file perform the same function.

WakeLock

WakeLock offers more granular control over the device’s power state. This method can be temporarily useful to keep the device awake as it increases the power consumption. Here are the detailed steps to configure it:

  1. Step 1:
    Launch the Studio
  2. Launch the Android Studio and open a project of the app that you want to set for screen always on.
  1. Step 2:
    Manage Permissions
  2. A WAKE_LOCK permission is necessary to set up wake lock on Android. So check out if it is allowed, otherwise add the following code in the ‘AndroidManifest.xml’ file to set the permission as allowed:
  1. Step 3:
    Add the Code
  2. Navigate to the activity or service that you want to keep screen on, and add the add the following code:

    For JAVA:

    PowerManager powerManager = (PowerManager) getSystemService(POWER_SERVICE);
    WakeLock wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
    "MyClassName::MyWakelockTag");
    wakeLock.acquire();

    For Kotlin, type:

    val wakeLock: PowerManager.WakeLock =
    (getSystemService(Context.POWER_SERVICE) as PowerManager).run {
    newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "MyClassName::MyWakelockTag").apply {
    acquire()
    }
    }

    In this code, the PowerManager.newWakeLock() is added to create and configure the PowerManager.WakeLock object only. It does not keep the device awake. However, the ‘acquire()’ is added to keep the device aware.

  1. Step 4:
    Turn off Wake Lock (When Not Required)
  2. Turning off will ultimately save for battery life.

    For JAVA:

    if (wakeLock != null && wakeLock.isHeld()) {
    wakeLock.release();
    }

    For Kotlin:

    if (wakeLock?.isHeld == true) {
    wakeLock.release()
    }

Note : Add your package, class or method name as part of the wake lock tag. This will help you in instant identification in the wake lock.

Advantages:

  • The ‘FLAG_KEEP_SCREEN_ON’ and ‘WakeLock’ are directly implemented within the app’s code to ensure seamless integration with app’s functionalities.
  • They offer a comprehensive control over the screen status that varies with the app’s requirement.

Limitations:

  • These methods are only suitable for developers and other users with coding skills because changes can be made by accessing the source code.
  • They significantly drain the battery letting the device to shut down earlier. FULL_WAKE_LOCK comparatively consumes more battery if not properly optimized.
  • Trying these steps without technical expertise can lead to system downtime or might hinder the app’s functionalities.

2Way 2. Setup with Third-Party Application

Recommend for: This method is suitable for users who do not want to compromise the security of devices by rooting them. Users with minimal changes required can prefer this method.

Recommended Third-Party Tools

Third-party automation tools include Tasker, MacroDroid and KinScreen. These tools offer automation, giving users a way to take control of screen settings and automate various tasks without root access. They allow customization of screen timeouts, brightness, and create automated workflows.

Demo: Configuring a Specific App Screen Always-On Using Kinscreen:

  • Keep Screen On
    Navigate to the 'Keep Screen On' tab, where you'll find several options: keep the screen on while charging, during calls, or when using apps. Select 'While using apps.' To identify apps, Kinscreen requires permission to manage usage access.

    kinscreen-choose-keep-screen-on

    give-permission-to-kinscreen

  • Choose Apps
    Choose your target apps from the list and click ok.

    keep-screen-on-for-specific-apps

  • Save and Activate
    Save your settings and ensure Kinscreen is running in the background to apply these settings. You can now keep your Android screen on when using selected apps.

Advantages:

  • These applications are easy to configure for even new users.
  • They do not require root access to customize screen settings.
  • This method is more flexible than the native settings required for app management.

Limitations:

  • Latest Android versions contain additional whitelist settings and background permission restrictions. Checking the compatibility of specific device models is hence necessary.
  • All these third-party apps may vary with each other in functionality and user interface.
  • Some of these apps ask for paid subscription to access full features of these tools.

3Way 3. Xposed/LSPosed

Recommend for: Xposed and LSPosed are powerful frameworks that give Android device owners and app developers an Android developer guide for altering the behavior of Android devices and apps like screen-on without altering APK files directly. Thus, this method is appropriate for users looking to have a granular control over concerned apps, able to navigate module compatibility concerns and perform root access.

💡Implementation Process

See the step-by-step instructions below to perform this method:

  1. Step 1:
    Reboot the Device
  2. Install Magisk to root your Android device and manage rotting permissions. The steps might vary based on your device model. So, apply the steps for rebooting accordingly.
  1. Step 2:
    Install Custom Recovery
  2. Find out and download a custom recovery like TWRP to flash the Xposed or LSPosed framework.
  1. Step 3:
    Install the Framework
  2. If you want to download Xposed framework, navigate to Xposed official repository. Otherwise navigate to GitHub repository to download LSPosed zip.
  1. Step 4:
    Flash It
  2. After downloading, boot into the custom recovery i.e. TWRP. Choose the ‘Install’ tab and navigate to download the ZIP file. Confirm installation and boot the device.
  1. Step 5:
    Install the Manager App
  2. Install the Xposed or LSPosed Manager app and other open the app to verify that the framework is properly operating.
  1. Step 6:
    Install a Module
  2. Download and install a module from the Manager app. Navigate to the modules tab and enable your installed module. Then reboot the device to apply changes.
  1. Step 7:
    Configure It
  2. Launch the module app from app drawer and enable screen-on functionality from settings in Xposed Edge. Save it and exit the app.

Advantages:

  • These modules allow controlling specific aspects of individual apps without altering the source code using the Android Runtime hooking process. Screen management, app permissions, UI Customization, specific functions, and behavior modifications are the important control options available.
  • The configuration of these modules can ensure customizable settings based on usage scenarios. For example enabling immersive mode for gaming apps, disabling screen timeout for DPF or e-books, and automatically enabling ‘Do Not Disturb’ mode during work hours.
  • These methods are free from source code and APK files modification processes.
  • These methods provide a centralized platform to manage all installed modules from a central position. The interface contains the module list, adjustable settings, and scope management.
  • This method allows creating complex rules like multi-app integration and task automation for enhanced screen management.

Limitations:

  • This method requires root access, which arises several security issues and void warranties by device manufacturers.
  • This method only works from Android version 8.1 to 14. So, module compatibilities varies.
  • Technical information is required for configuring the modules properly.
  • Some of the module might lack updates.
Additional Considerations:

①Users need to continuously check out GitHub and XDA forums to keep updated with latest information and updates about compatibility.

②Not all modules are compatible. Some modules are only compatible with specific Xposed / LSPosed versions.

③Confirmation of modules proper functionality is essential before relying on them.

④For latest Android versions, it is essential to verify module compatibility. This is because of the restrictions on some features applied by Google’s latest security models.

4Way 4. Brand-Specific System Settings

Recommend for: It is appropriate for users who do not trust third-party apps and look to get solutions by managing built-in features.

💡Supported Brands and Their Features:

1-Samsung Devices

Smart Stay: This feature helps to keep the screen on by using the front cam while looking at it(Keep screen on while viewing).

  1. Step 1.Unlock your Samsung device and tap the “Settings” icon.
  2. step1-samsung-settings

  3. Step 2.Navigate to 'Advanced features' and select 'Motions and gestures'. Here, you can enable 'Keep screen on while viewing'.
  4. step2-samsung-advanced-features

    step4-samsung-motions-and-gestrues

    step4-choose-keep-screen-on

Global "Never Sleep": This feature is available on very limited device models. Navigate to the ‘Settings’ tab and tap on ‘Display’ option. Then choose ‘Screen Timeout’ option and enable ‘Never Sleep’ to disable screen timeout.

2-Xiaomi Devices (MIUI)

Global Wake Lock: This options allows keeping the screen on while the device is being charged. Open the device ‘Settings’ and navigate to ‘Additional Settings’. Tap ‘Developer Options’ and choose ‘Stay Awake’ to enable screen on.

Per-App Screen On: Some international MIUI Xiaomi devices contain this functionality. It requires technical knowledge. Check out XDA forums that are primarily operational for specific device model. Search for the custom ROMs or modules that enable this feature and follow the steps detailed on these forums to install it.

3-OnePlus Devices (OxygenOS)

Screen Timeout Settings: Open the device ‘Settings’ tab and click on ‘Display’ option. Then select ‘Screen Timeout’ and choose the maximum time it offers. This method is very general and only offers 30 minutes timeout duration.

Developer Options: OnePlus Devices have ‘Stay Awake’ functionality in developer options. Navigate to the ‘About Phone’ tab in device Settings. Tap ‘Build Number’ seven times to enable developer options. Open the Settings again and select ‘System’ to enable ‘Stay Awake’ feature. This feature is only suitable when the device charger is plugged in.

Pros

  • No third-party tools or device rooting is required to enable these features.
  • These methods have direct integration with the device’s native settings, eliminating the need for additional support.

Cons

  • These are the global settings offered by various device models.
  • The customization options are very limited as compared to other methods.
  • Some features like ‘Stay Awake’ only works when the device charger is plugged in.

5Way 5. MDM Solution for Businesses

Recommend for: It is suitable for businesses with bulk devices. It ensures all the devices receive the same settings and policies to ensure high security and compliance. Functions like disable screen timeout/keep screen on can be managed on all or few devices as required by the administration.
  1. Step 1:
    Open the 'Policy and kiosk config files' tab
  2. Sign up and log into AirDroid Business admin console. Select the 'Policy and kiosk' tab from the main menu at the top and then select 'Policy and kiosk config files' from the left side menu bar to create a new config file.
  3. Sign Up AirDroid Business

    policy and kiosk

  1. Step 2:
    Select the app
  2. Select the single app mode option and choose your desired app to run in one app mode with continuous display.
  3. set-chrome-in-single-app-mode

  1. Step 3:
    How to keep Android screen from timing out: set up screen always on
  2. Select the 'Display' tab from the menu appearing from top to bottom. Open the dropdown menu below the Screen timeout tab and select 'Keep Awake.' Also, turn the slider on after the 'keep the screen awake' option. Click the 'Next' button to enter a profile name and code. 
  3. keep screen awake on certain app

  1. Step 4:
    Save and Apply configuration on devices
  2. Then press the 'Save and Apply' button. Click on the 'Add' button after the 'Apply Config file to the following devices/groups' and select the devices to apply the configuration. Click 'OK,' and it will be applied to selected devices. After completing the setup, the screens of the devices in your management group will stay on and be locked to the app interface you've set.
  3. apply policy to android devices

Advantages:

  • Centralized Management: MDM allows implementing same policies and rules across all devices from the dashboard to ensure consistency.
  • Scalability: MDM solutions allow bulk enrollment of devices with ability to efficiently manage screen settings for thousands of devices without disruptions.
  • Remote Troubleshooting: MDM solutions offer remote monitoring and access feature to diagnose issues and remotely troubleshoot them, saving costs and downtime of devices.

Limitations:

  • MDM solutions mostly requires paid subscriptions. So, it’s better to first try out solutions that offer a free trial before paying amounts to a specific provider and find the most appropriate one.

Potential Issues and Considerations

Issue 1. Unusual battery consumption

Using tools to constantly keep the screen for hours can increase the power consumption rate and thus it would lead to draining of battery faster than usual.

To overcome this issue:

  • Enable automatic brightness or reduce the screen brightness and ensure the device is regularly charged.
  • Use dark mode on AMOLED screens as power consumption in this mode is low.
  • Do not set keep screen on regularly. Optimize the screen timeout as required.
  • Enable battery saver mode, as it limits the background processes and the battery time increases.

Issue 2. Device Over-heating

Continuous screen-on with heavy brightness while using high processing apps like location-based gaming apps can lead the device to overheat.

To overcome this issue:

  • Close all unnecessary apps running in the background and keep the brightness lower.
  • Use cooling pads or fans to keep the device cool even when using heavy apps.
  • Include breaks in your device usage process and keep checking the temperature to use the Android device accordingly. Moreover, keep the devices away from heat or direct sunlight.

Issue 3. Screen Burn-in

AMOLED/OLED screens can become vulnerable to burn-in when left in static display mode for a long time.

To overcome this issue:

  • Reduce the brightness of the device screen and enable features that slightly move the screen content. Some appropriate examples include Screen Shift and Pixel Shift.
  • Using apps that contain dynamic content or by enabling screensavers, this issue can be minimized.
  • Changing the color scheme or installing the apps that prevent burn-in also reduces this risk.

Final Words

We have explored a comprehensive range of methods to keep the Android screen on for specific apps, spanning from the simplest to the most complex solutions.

This functionality is highly beneficial for both individuals and businesses. For instance, officials require uninterrupted screen time during presentations, drivers need to constantly check directions on Maps to stay on course, and industries such as retail, hospitality, and healthcare rely on self-service kiosks, point-of-sale (POS) systems, and check-in terminals that maintain regular screen activity.

It is highly recommended that businesses opt for a central management system, such as AirDroid Business MDM solution, to achieve greater ease of use and enhanced customization options. This approach leads to better control and overall management.

Get AirDroid Business Free Trial

FAQs

How do I lock my screen to one app on Android?
Maverick
Maverick
App pinning and setting kiosk mode on Android devices are the two appropriate methods to lock the screen to one app. Preferably, enterprises need to use an MDM solution to enable single-app kiosk mode on bulk devices and manage it remotely.
How do I make my apps stay awake?
Maverick
Maverick
Open the device 'Settings' app and scroll down to select the 'Display' tab. Tap on screen timeout and choose the maximum time to keep it awake, and it will stay awake for the set time even if the device remains untouched.
How to disable screen timeout while charging?
Maverick
Maverick
To disable screen timeout while charging, open the display tab from Settings apps and then select the 'keep the screen on while charging' option. It will enable you to disable the screen timeout and continuously show the display.
Click a star to vote
14620 views
Was This Page Helpful?
Maverick
Maverick
For more than 8 years, Maverick has dig deep into IT and mobile device management. He delivers practical MDM solution tips and strategies for various endpoints management.
You Might Also Like
AirDroid Parental Control Social Content Detection
AirDroid Parental Control Launches Social Content Detection New Feature for Enhanced Child Safety Online
Anita R.
Anita R.
Apr 10, 2025
Introducing the New Launch of AirDroid Parental Control Web Version
Anita R.
Anita R.
Aug 28, 2024
Android Zero-Touch Enrollment with AirDroid Business for Streamlined Android Device Management
Anita R.
Anita R.
Nov 9, 2023
10 Best AI Telegram Chatbots & How to Create It
Isabella
Isabella
Jan 17, 2024
Exploring 10 Free Online Chatbots to Enhance Your Business
Isabella
Isabella
Mar 8, 2024
AirDroid Business Is Now A Google Certified Enterprise Mobility Management Solution Provider
Anita R.
Anita R.
May 31, 2023
AirDroid Parental Control Social Content Detection
AirDroid Parental Control Launches Social Content Detection New Feature for Enhanced Child Safety Online
Anita R.
Anita R.
Apr 10, 2025
Introducing the New Launch of AirDroid Parental Control Web Version
Anita R.
Anita R.
Aug 28, 2024
Android Zero-Touch Enrollment with AirDroid Business for Streamlined Android Device Management
Anita R.
Anita R.
Nov 9, 2023
10 Best AI Telegram Chatbots & How to Create It
Isabella
Isabella
Jan 17, 2024
Exploring 10 Free Online Chatbots to Enhance Your Business
Isabella
Isabella
Mar 8, 2024
AirDroid Business Is Now A Google Certified Enterprise Mobility Management Solution Provider
Anita R.
Anita R.
May 31, 2023
Discussion
The discussion and share your voice here.

Leave a Reply. Cancel reply

Your email address will not be published. Required fields are marked*

*

Product-related questions?Contact Our Support Team to Get a Quick Solution>
Home > App Management > Android Keep Screen on for Certain Apps [Comprehensive Guide]
Like
Dislike