How to stop screen turning on when starting to charge

The only way to do this is through root privileges. Tasker is the solution I used for years before I needed to stop rooting my devices.

As others have stated, shortening screen timeout is an unacceptable solution to this problem. It does not solve the problem; it just attenuates one of the effects of the problem. It also results in the phone requiring more user interaction--turning the screen back on more frequently--throughout the rest of the day, and the whole problem is that the phone is requiring extra user interaction of needing to turn off the display after it begins to charge. Shortening screen timeout not only does not solve the underlying problem, it also creates a similar problem which occurs even more frequently than the original one.

I remember trying to figure this out 10 years ago for Android 2.2 Froyo on my OG Droid, and many other people were asking the same thing. If people have been asking Google for this feature for 10 years, and Google hasn't implemented it yet, I doubt they will any time soon, if ever.
 
Last edited:
Could you share more details about your Tasker script? I have Tasker, but have not found it very intuitive to create a script such as you have described.

Sorry for late reply ^^
Pretty simple:

New Tasker Profile, which becomes active if: "State: Power Any"
Task: "System Lock" (may only work if root)
Set the same task as Exit task too. Voilla.
 
I realize that this is an old post, but with the latest Android updates, this shouldn't be a problem now. But if it is, try AutomateIt Pro. In it's Market Place there are routines and tasks that will easily solve this problem, and many others. It is an alternative to Tasker and a bit easier to implement. I have used Tasker as well but I find AutomateIt Pro to be easier for many tasks.
 
Holy Grail for this issue! No root!! Use Macrodroid (free or pro) set up two Macros. Macro 1: Trigger - Power Connected > Action - Screen Off. Macro 2: Trigger - Power Disconnected > Action - Screen Off. It works perfect and I could not be happier!! This has annoyed me since they took the feature away on my S2. Did this on an S8 latest OS as of today. Now the LED is the only thing that shows; red while charging and green when full. Bonus perk, soon as you start the charge it blanks the screen. You can choose to have the screen lock or not with the trigger. Also can choose the type of charging source. Freaking amazing program. Instantly bought Pro, like $3 (ads suck) BTW tried Tasker Pro and AutomateIt Pro and neither can handle solving this so perfect. Oh will prob need a third macro to prevent the screen coming on when full; Trigger - Full Charge > Action - Screen off. This may be a tricky one as it states Trigger at 100%, so not sure how will work off the charger fully charged.
 

Attachments

  • Screenshot_20191004-135539_MacroDroid.jpg
    Screenshot_20191004-135539_MacroDroid.jpg
    119.1 KB · Views: 5
Last edited:
Holy Grail for this issue! No root!! Use Macrodroid (free or pro) set up two Macros. Macro 1: Trigger - Power Connected > Action - Screen Off. Macro 2: Trigger - Power Disconnected > Action - Screen Off. It works perfect and I could not be happier!! This has annoyed me since they took the feature away on my S2. Did this on an S8 latest OS as of today. Now the LED is the only thing that shows; red while charging and green when full. Bonus perk, soon as you start the charge it blanks the screen. You can choose to have the screen lock or not with the trigger. Also can choose the type of charging source. Freaking amazing program. Instantly bought Pro, like $3 (ads suck) BTW tried Tasker Pro and AutomateIt Pro and neither can handle solving this so perfect. Oh will prob need a third macro to prevent the screen coming on when full; Trigger - Full Charge > Action - Screen off. This may be a tricky one as it states Trigger at 100%, so not sure how will work off the charger fully charged.

Hey man! Thanks a ton! Works perfect for me! I have a tablet in my truck that stays there mounted to the dashboard. I connect it through a usb hub that then connects to the vehicle usb ports so I can use android auto. Problem is, the vehicle usb ports power off so the tablet doesn't charge when the truck Is off. The powered Anker 7 usb port keeps it charged! Another problem was, when the vehicle usb ports powered off, a new signal was sent to the tablet that it was charging a minute or two after I shut my vehicle doors. That made the screen turn on, which is much more eye catching than a screen that is off. I can set up a macro so the screen automatically turns off when the power connected signal happens! The screen now automatically turns on when I turn my truck on and automatically turns off a minute or two after the doors are shut! Thanks a ton! This was perfect!