64

I have an HTC Desire. When I plug charger into my phone with screen off, it always turns the screen back on. This is slightly annoying at night.

Is it possible to configure Android so that the screen stays off and charging is only indicated via charging LED?

4
  • On my samsung galaxy S there is a timeout setting for the screen on the settings menu. You have to set the timer from infinite to some period while charging.
    – Barfieldmv
    Commented Apr 14, 2011 at 11:01
  • 1
    For my Droid, anyway, I just tap the power button to turn the screen back off.
    – ale
    Commented Apr 14, 2011 at 13:01
  • Just my thought: my Samsung Galaxy S used to do this too when it was running Android 2.1 and 2.2. But it doesn't do that anymore now that I am running 2.2.1. I can't recall uninstalling any application so to my experience, it was the upgrade which solved this. And be sure to turn your wifi off too.
    – Edelcom
    Commented Apr 14, 2011 at 16:05
  • 7
    @AI E.: Every time I plug my phone in, I want the screen off, not on. That means every time I plug my phone in, I have to "just" tap my screen. Also, sometimes I have a flaky USB connection, so the charge keeps turning on and off; the screen then keeps coming back on, draining my battery. (Like Michael just stated happened with him.) Commented Aug 23, 2014 at 20:23

9 Answers 9

12

SnooZy Charger takes care of this. The free app (as in beer and speech) that lets you manage behavior during charger connection and disconnection.

It requires no permissions but does require you to give it the device admin permissions. These permissions are only used to control device locking, as verifiable in its source code. From quickly going through the app’s source code, it looks totally harmless and benign.

If the app does not behave as you want, make sure to go through the Settings. For example, “Turn off screen only when locked” is enabled by default. This means that the app will not kick into effect if you have an on/off-button-press-lock delay or other related settings.

It works perfectly for my on a wireless charging pad and with a micro-USB cable using an LG Nexus 4 device. I am very satisfied.

I also documented additional issues here.

5
  • 2
    Bears are dangerous, not free! But seriously, this app is pretty close. Doesn't actually keep screen off, it just immediately shuts it off. One minor bug seems to be that when you unplug the phone, the screen stays off, but the buttons turn on and stay on.
    – Cerin
    Commented Apr 17, 2014 at 14:49
  • 5
    I wouldn't say this app behaves "perfectly", although it's better than nothing. The screen still turns on, then quickly turns back off--obviously more of a workaround than a fix. Annoyingly, on my phone still does the silly "USB icon at the bottom that shifts your screen up", which I really just want to disable altogether. Commented Aug 23, 2014 at 20:33
  • 1
    I've used this app for some time but eventually uninstalled it. It was sometime turning my screen off when I when I was turning it on, and sometime twice in a row, not sure when or why, but this was quite annoying. What it's doing is more of a hack anyway.
    – laurent
    Commented Sep 2, 2015 at 11:51
  • I am from Brazil and I can't install it. I get this: "Sorry! This content is not available in your country yet. We're working to bring the content you love to more countries as quickly as possible. Please check back again soon." WTF. :( Commented Mar 15, 2017 at 21:33
  • I am using an old tablet as a small server. This app along with Gravity Screen keeps the screen off while the table is in never sleep mode.
    – the Hutt
    Commented Oct 29, 2022 at 6:05
7

Do you happen to have enabled Settings > Application > Development > Stay Awake (screen will never sleep when charging)?

1
  • 9
    This is the same as Matt H's (now deleted) answer ... OP's comments was "The problem is not that I cannot turn the screen back off. I want it to not go on in the first place. Seems like that's not possible, sadly :-(". Commented Apr 14, 2011 at 13:17
3

As far as I can see, the only way to archive this behaviour is to switch from stock Android to CyanogenMod - which does have this feature built-in (under "Display & lights" menu in preferences, disable the option "Wake on plug")

I'm also searching for a solution on stock Android, but it seems like that's the only way. Too bad, one has to change ROM just for this feature.

2
  • Do you know how does this feature work on CyanogenMod/LineageOS? Commented Sep 1, 2020 at 3:36
  • LineageOS has the same option.
    – user598527
    Commented Mar 1, 2021 at 15:36
2

If you install Xposed, All My... module has an option to prevent the screen from waking when plugging into a charger.

2

I realise this was asked a while ago but since this still comes up first in Google when you search for how to disable the coloured screen when charging a Samsung device, here the updated answer: in the settings menu under Display > Screensaver you can choose the screen saver that is shown while the device is charging. Simply set this to "none".

5
  • Which version of Android is this?
    – Chenmunka
    Commented Jun 1, 2022 at 11:03
  • Is that a thing custom to Samsung?
    – VoY
    Commented Jun 2, 2022 at 6:31
  • @Chenmunka: I have One UI 4.1 (Android 12)
    – Yoblo
    Commented Jun 2, 2022 at 21:52
  • @VoY: I am not sure.
    – Yoblo
    Commented Jun 2, 2022 at 21:53
  • @VoY this feature is generally known as Daydream.
    – Andrew T.
    Commented Jun 11, 2023 at 20:03
1

There is an app by mitskiP called Screen Stay Off. I've used it for a year and it works nicely. My only criticism is that the screen turns on briefly, then turns off.

0

Try using these two in harmony:

It worked for me.

1
  • 1
    Looks like Sony's Smart Connect has been taken off from Play Store. Will this approach still work without it?
    – Andrew T.
    Commented Sep 24, 2021 at 8:48
0

Having the "Ambient mode" on turns the screen on while charging, even if the option "Settings > Application > Development > Stay Awake (screen will never sleep when charging)" is off.

You need to turn the "Ambient mode" off as well.

I would not suggest to install further applications only for that, while you can do the trick directly from Android.

0

I have made a Tasker profile. It works by waiting for a state change and then reverting the screen state to whatever it was before said change.

Here is the copy of my Screen.prj.xml profile:

<TaskerData sr="" dvi="1" tv="6.0.10">
    <Profile sr="prof42" ve="2">
        <cdate>1658764422437</cdate>
        <edate>1658770109384</edate>
        <flags>8</flags>
        <id>42</id>
        <mid0>41</mid0>
        <nme>POWER UNPLUGGED</nme>
        <Share sr="Share">
            <b>false</b>
            <d>When you unplug your phone from a power source, have your screen automatically lock itself.</d>
            <g>Basics,Display,Security</g>
            <p>true</p>
            <t></t>
        </Share>
        <State sr="con0" ve="2">
            <code>10</code>
            <pin>true</pin>
            <Int sr="arg0" val="0"/>
        </State>
    </Profile>
    <Profile sr="prof47" ve="2">
        <cdate>1658765139741</cdate>
        <clp>true</clp>
        <edate>1658770063039</edate>
        <flags>8</flags>
        <id>47</id>
        <mid0>48</mid0>
        <nme>DISP ON</nme>
        <Event sr="con0" ve="2">
            <code>208</code>
        </Event>
    </Profile>
    <Profile sr="prof49" ve="2">
        <cdate>1658765984104</cdate>
        <clp>true</clp>
        <edate>1658770076363</edate>
        <flags>8</flags>
        <id>49</id>
        <mid0>50</mid0>
        <nme>DISP OFF</nme>
        <Event sr="con0" ve="2">
            <code>210</code>
        </Event>
    </Profile>
    <Profile sr="prof51" ve="2">
        <cdate>1658764422437</cdate>
        <clp>true</clp>
        <edate>1658770092328</edate>
        <flags>8</flags>
        <id>51</id>
        <mid0>52</mid0>
        <nme>POWER PLUGGED</nme>
        <Share sr="Share">
            <b>false</b>
            <d>When you plug your phone in leave screen on/off state alone. (Will revert screen state after android toggles it).</d>
            <g>Display,Power</g>
            <p>true</p>
            <t></t>
        </Share>
        <State sr="con0" ve="2">
            <code>10</code>
            <Int sr="arg0" val="0"/>
        </State>
    </Profile>
    <Project sr="proj0" ve="2">
        <cdate>1658764409345</cdate>
        <name>SCREEN</name>
        <pids>47,42,49,51</pids>
        <tids>46,50,41,48,52</tids>
        <Share sr="Share">
            <b>false</b>
            <d>Revert or maintain screen on/off state after power plugged in or out.</d>
            <g>Display,Power</g>
            <p>true</p>
            <t></t>
        </Share>
    </Project>
    <Task sr="task41">
        <cdate>1650476952536</cdate>
        <edate>1658769236054</edate>
        <id>41</id>
        <pri>100</pri>
        <Action sr="act0" ve="7">
            <code>547</code>
            <Str sr="arg0" ve="3">%STARTED</Str>
            <Str sr="arg1" ve="3">%TIMES</Str>
            <Int sr="arg2" val="0"/>
            <Int sr="arg3" val="0"/>
            <Int sr="arg4" val="0"/>
            <Int sr="arg5" val="3"/>
            <Int sr="arg6" val="1"/>
            <ConditionList sr="if">
                <bool0>And</bool0>
                <Condition sr="c0" ve="3">
                    <lhs>%STARTED</lhs>
                    <op>13</op>
                    <rhs></rhs>
                </Condition>
                <Condition sr="c1" ve="3">
                    <lhs>%SCREEN</lhs>
                    <op>2</op>
                    <rhs>on</rhs>
                </Condition>
            </ConditionList>
        </Action>
        <Action sr="act1" ve="7">
            <code>547</code>
            <Str sr="arg0" ve="3">%UPTIME</Str>
            <Str sr="arg1" ve="3">%TIMES-%STARTED</Str>
            <Int sr="arg2" val="0"/>
            <Int sr="arg3" val="1"/>
            <Int sr="arg4" val="0"/>
            <Int sr="arg5" val="3"/>
            <Int sr="arg6" val="1"/>
        </Action>
        <Action sr="act2" ve="7">
            <code>548</code>
            <on>false</on>
            <Str sr="arg0" ve="3">%UPTIME</Str>
            <Int sr="arg1" val="0"/>
            <Str sr="arg10" ve="3"/>
            <Int sr="arg11" val="1"/>
            <Int sr="arg12" val="0"/>
            <Str sr="arg13" ve="3"/>
            <Int sr="arg14" val="0"/>
            <Int sr="arg2" val="0"/>
            <Str sr="arg3" ve="3"/>
            <Str sr="arg4" ve="3"/>
            <Str sr="arg5" ve="3"/>
            <Str sr="arg6" ve="3"/>
            <Str sr="arg7" ve="3"/>
            <Str sr="arg8" ve="3"/>
            <Int sr="arg9" val="1"/>
        </Action>
        <Action sr="act3" ve="7">
            <code>248</code>
            <Int sr="arg0" val="0"/>
            <Int sr="arg1" val="1"/>
            <ConditionList sr="if">
                <Condition sr="c0" ve="3">
                    <lhs>%UPTIME</lhs>
                    <op>6</op>
                    <rhs>1</rhs>
                </Condition>
            </ConditionList>
        </Action>
    </Task>
    <Task sr="task46">
        <cdate>1658764707914</cdate>
        <edate>1658765118823</edate>
        <id>46</id>
        <nme>Dont Screen On On Power</nme>
        <Action sr="act0" ve="7">
            <code>548</code>
            <Str sr="arg0" ve="3">%SCREEN</Str>
            <Int sr="arg1" val="0"/>
            <Str sr="arg10" ve="3"/>
            <Int sr="arg11" val="1"/>
            <Int sr="arg12" val="0"/>
            <Str sr="arg13" ve="3"/>
            <Int sr="arg14" val="0"/>
            <Int sr="arg2" val="0"/>
            <Str sr="arg3" ve="3"/>
            <Str sr="arg4" ve="3"/>
            <Str sr="arg5" ve="3"/>
            <Str sr="arg6" ve="3"/>
            <Str sr="arg7" ve="3"/>
            <Str sr="arg8" ve="3"/>
            <Int sr="arg9" val="1"/>
        </Action>
        <Action sr="act1" ve="7">
            <code>248</code>
            <on>false</on>
            <Int sr="arg0" val="0"/>
            <Int sr="arg1" val="0"/>
            <ConditionList sr="if">
                <Condition sr="c0" ve="3">
                    <lhs>%SCREEN</lhs>
                    <op>2</op>
                    <rhs>off</rhs>
                </Condition>
            </ConditionList>
        </Action>
    </Task>
    <Task sr="task48">
        <cdate>1658765152954</cdate>
        <edate>1658767756538</edate>
        <id>48</id>
        <nme>Display Uptime</nme>
        <pri>6</pri>
        <Action sr="act0" ve="7">
            <code>547</code>
            <Str sr="arg0" ve="3">%STARTED</Str>
            <Str sr="arg1" ve="3">%TIMES</Str>
            <Int sr="arg2" val="0"/>
            <Int sr="arg3" val="0"/>
            <Int sr="arg4" val="0"/>
            <Int sr="arg5" val="3"/>
            <Int sr="arg6" val="1"/>
        </Action>
        <Action sr="act1" ve="7">
            <code>548</code>
            <on>false</on>
            <Str sr="arg0" ve="3">started %STARTED</Str>
            <Int sr="arg1" val="0"/>
            <Str sr="arg10" ve="3"/>
            <Int sr="arg11" val="1"/>
            <Int sr="arg12" val="0"/>
            <Str sr="arg13" ve="3"/>
            <Int sr="arg14" val="0"/>
            <Int sr="arg2" val="0"/>
            <Str sr="arg3" ve="3"/>
            <Str sr="arg4" ve="3"/>
            <Str sr="arg5" ve="3"/>
            <Str sr="arg6" ve="3"/>
            <Str sr="arg7" ve="3"/>
            <Str sr="arg8" ve="3"/>
            <Int sr="arg9" val="1"/>
        </Action>
        <Action sr="act2" ve="7">
            <code>549</code>
            <Str sr="arg0" ve="3">%STOPPED</Str>
            <Int sr="arg1" val="0"/>
            <Int sr="arg2" val="0"/>
            <Int sr="arg3" val="0"/>
        </Action>
    </Task>
    <Task sr="task50">
        <cdate>1658766071199</cdate>
        <edate>1658769148172</edate>
        <id>50</id>
        <nme>Reset Screen Uptime</nme>
        <pri>6</pri>
        <Action sr="act0" ve="7">
            <code>547</code>
            <Str sr="arg0" ve="3">%STOPPED</Str>
            <Str sr="arg1" ve="3">%TIMES</Str>
            <Int sr="arg2" val="0"/>
            <Int sr="arg3" val="0"/>
            <Int sr="arg4" val="0"/>
            <Int sr="arg5" val="3"/>
            <Int sr="arg6" val="1"/>
        </Action>
        <Action sr="act1" ve="7">
            <code>548</code>
            <on>false</on>
            <Str sr="arg0" ve="3">Stopped %STOPPED</Str>
            <Int sr="arg1" val="0"/>
            <Str sr="arg10" ve="3"/>
            <Int sr="arg11" val="1"/>
            <Int sr="arg12" val="0"/>
            <Str sr="arg13" ve="3"/>
            <Int sr="arg14" val="0"/>
            <Int sr="arg2" val="0"/>
            <Str sr="arg3" ve="3"/>
            <Str sr="arg4" ve="3"/>
            <Str sr="arg5" ve="3"/>
            <Str sr="arg6" ve="3"/>
            <Str sr="arg7" ve="3"/>
            <Str sr="arg8" ve="3"/>
            <Int sr="arg9" val="1"/>
        </Action>
        <Action sr="act2" ve="7">
            <code>547</code>
            <on>false</on>
            <Str sr="arg0" ve="3">%UPTIME</Str>
            <Str sr="arg1" ve="3">0</Str>
            <Int sr="arg2" val="0"/>
            <Int sr="arg3" val="0"/>
            <Int sr="arg4" val="0"/>
            <Int sr="arg5" val="3"/>
            <Int sr="arg6" val="1"/>
        </Action>
        <Action sr="act3" ve="7">
            <code>549</code>
            <Str sr="arg0" ve="3">%STARTED</Str>
            <Int sr="arg1" val="0"/>
            <Int sr="arg2" val="0"/>
            <Int sr="arg3" val="0"/>
        </Action>
    </Task>
    <Task sr="task52">
        <cdate>1650476952536</cdate>
        <edate>1658769822832</edate>
        <id>52</id>
        <pri>100</pri>
        <Action sr="act0" ve="7">
            <code>548</code>
            <on>false</on>
            <Str sr="arg0" ve="3">%STOPPED</Str>
            <Int sr="arg1" val="0"/>
            <Str sr="arg10" ve="3"/>
            <Int sr="arg11" val="1"/>
            <Int sr="arg12" val="0"/>
            <Str sr="arg13" ve="3"/>
            <Int sr="arg14" val="0"/>
            <Int sr="arg2" val="0"/>
            <Str sr="arg3" ve="3"/>
            <Str sr="arg4" ve="3"/>
            <Str sr="arg5" ve="3"/>
            <Str sr="arg6" ve="3"/>
            <Str sr="arg7" ve="3"/>
            <Str sr="arg8" ve="3"/>
            <Int sr="arg9" val="1"/>
        </Action>
        <Action sr="act1" ve="7">
            <code>547</code>
            <on>false</on>
            <Str sr="arg0" ve="3">%STOPPED</Str>
            <Str sr="arg1" ve="3">%TIMES</Str>
            <Int sr="arg2" val="0"/>
            <Int sr="arg3" val="0"/>
            <Int sr="arg4" val="0"/>
            <Int sr="arg5" val="3"/>
            <Int sr="arg6" val="1"/>
            <ConditionList sr="if">
                <bool0>And</bool0>
                <Condition sr="c0" ve="3">
                    <lhs>%STOPPED</lhs>
                    <op>13</op>
                    <rhs></rhs>
                </Condition>
                <Condition sr="c1" ve="3">
                    <lhs>%SCREEN</lhs>
                    <op>2</op>
                    <rhs>off</rhs>
                </Condition>
            </ConditionList>
        </Action>
        <Action sr="act2" ve="7">
            <code>547</code>
            <Str sr="arg0" ve="3">%DOWNTIME</Str>
            <Str sr="arg1" ve="3">%TIMES-%STOPPED</Str>
            <Int sr="arg2" val="0"/>
            <Int sr="arg3" val="1"/>
            <Int sr="arg4" val="0"/>
            <Int sr="arg5" val="3"/>
            <Int sr="arg6" val="1"/>
        </Action>
        <Action sr="act3" ve="7">
            <code>547</code>
            <Str sr="arg0" ve="3">%DOWNTIME</Str>
            <Str sr="arg1" ve="3">0</Str>
            <Int sr="arg2" val="0"/>
            <Int sr="arg3" val="0"/>
            <Int sr="arg4" val="0"/>
            <Int sr="arg5" val="3"/>
            <Int sr="arg6" val="1"/>
            <ConditionList sr="if">
                <Condition sr="c0" ve="3">
                    <lhs>%STOPPED</lhs>
                    <op>13</op>
                    <rhs></rhs>
                </Condition>
            </ConditionList>
        </Action>
        <Action sr="act4" ve="7">
            <code>548</code>
            <on>false</on>
            <Str sr="arg0" ve="3">Downtime %DOWNTIME</Str>
            <Int sr="arg1" val="0"/>
            <Str sr="arg10" ve="3"/>
            <Int sr="arg11" val="1"/>
            <Int sr="arg12" val="0"/>
            <Str sr="arg13" ve="3"/>
            <Int sr="arg14" val="0"/>
            <Int sr="arg2" val="0"/>
            <Str sr="arg3" ve="3"/>
            <Str sr="arg4" ve="3"/>
            <Str sr="arg5" ve="3"/>
            <Str sr="arg6" ve="3"/>
            <Str sr="arg7" ve="3"/>
            <Str sr="arg8" ve="3"/>
            <Int sr="arg9" val="1"/>
        </Action>
        <Action sr="act5" ve="7">
            <code>806</code>
            <on>false</on>
            <Int sr="arg0" val="216"/>
            <ConditionList sr="if">
                <Condition sr="c0" ve="3">
                    <lhs>%DOWNTIME</lhs>
                    <op>6</op>
                    <rhs>2</rhs>
                </Condition>
            </ConditionList>
        </Action>
        <Action sr="act6" ve="7">
            <code>248</code>
            <Int sr="arg0" val="1"/>
            <Int sr="arg1" val="1"/>
            <ConditionList sr="if">
                <Condition sr="c0" ve="3">
                    <lhs>%DOWNTIME</lhs>
                    <op>7</op>
                    <rhs>1</rhs>
                </Condition>
            </ConditionList>
        </Action>
        <Action sr="act7" ve="7">
            <code>548</code>
            <on>false</on>
            <Str sr="arg0" ve="3">%DOWNTIME</Str>
            <Int sr="arg1" val="0"/>
            <Str sr="arg10" ve="3"/>
            <Int sr="arg11" val="1"/>
            <Int sr="arg12" val="0"/>
            <Str sr="arg13" ve="3"/>
            <Int sr="arg14" val="0"/>
            <Int sr="arg2" val="0"/>
            <Str sr="arg3" ve="3"/>
            <Str sr="arg4" ve="3"/>
            <Str sr="arg5" ve="3"/>
            <Str sr="arg6" ve="3"/>
            <Str sr="arg7" ve="3"/>
            <Str sr="arg8" ve="3"/>
            <Int sr="arg9" val="1"/>
        </Action>
    </Task>
</TaskerData>
1
  • 1
    Hello. No third-party link dependent answer please. I have added the content of XML file in your answer. A more readable solution to share Tasker profiles is to mention the steps needed to create the Profile and the Task. E.g. Profile: Action -> some_Action. Task: app -> launch app -> do_this
    – Firelord
    Commented Jul 28, 2022 at 18:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .