Android app prevent device to sleep

Tanapol E. 7 years ago in Applications / i3 Pro updated by Aleksandr Romanov (CTO) 7 years ago 6

Android app 1.1.7/Beta


On Android

When user press power button while still in i3pro app

Android Device will go to sleep state then wake up immediately(screen still off)

and when user press  power button again it will skip all lock screen and show i3pro app


this will drain Android Device battery eventif screen is off 

because of i3pro continue to work in background

it there anyway to disable  i3pro app running in background on some panel project?

Waiting for user's reply


Android Device will go to sleep state then wake up immediately(screen still off)

I do not quite understand. How do you understand that the device has woken up if the screen is still off?

Please specify the model of the device, as well as the version of Android, on which you observe such a problem.


I test on 

Google Nexus 6P - 7.1.2


Samsung Note 5 - 7.0

same problem.

I notice this problem on 6P first because  
when I press device power button, 6P will play some "turn off sound" and screen will be off

and when I press device power again 6P will play some "turn on sound" and screen will be on then showing lock screen

but when i3 is running and I press power button i can hear "turn off sound" then "turn on sound" but screen remain off

if I press device power button again screen will show i3 without any lock screen

(I think this state in Android called WAKE_LOCK,screen off but some app still running )

The problem is in this state i3 continue drain my phone battery

this can easily test by 100% charge your phone, unplug, open i3 app,  power button, then phone screen will off

then just let phone remain in that state for a few hour without using

when you turn on you phone again battery will be very low

if you check which app is draining battery in Setting->Battery> Use since last full charge 

I3 Pro will be in top of the list,

if you click in i3 Pro, see "Keep awake" time you will see that i3 Pro keep device awake all the time 

even if screen is remain off.

Please note that state is OK to use with device that always have adapter plug in

but for mobile phone if user forgot to close i3 app before turn off phone screen

i3 will continue running in that background

(I also do some additional test by let i3 send some feedback by using IR.SetInterval 

to see if i3 still running JS script in this state or not,

result : i3 will not run any JS nor sending anything in this state)

Hello, is your problem still unresolved?

problem remain the same but now i have workaround by add "exit" button to panel that use on smart phone.


I apologize for not being able to repeat this situation and take action to correct it.