# \[Superpost\] Possible to keep screen active / screen on?

**URL:** https://community.thunkable.com/t/superpost-possible-to-keep-screen-active-screen-on/63540
**Category:** Questions about Thunkable X
**Tags:** solved, superpost
**Created:** [January 7, 2019, 12:28am UTC](https://community.thunkable.com/t/superpost-possible-to-keep-screen-active-screen-on/63540 "2019-01-07T00:28:57Z")
**Posts on this page:** 20
**Page:** 2

<div class="post-metadata">

### Author: ![hhuman](https://avatars.discourse-cdn.com/v4/letter/h/3be4f8/32.png) [@hhuman](https://community.thunkable.com/u/hhuman)
#### Post date: [November 25, 2019, 10:20pm UTC](https://community.thunkable.com/t/superpost-possible-to-keep-screen-active-screen-on/63540/21 "2019-11-25T22:20:57Z")

</div>

Yes, I included the html file and the js in the asset. I only tested for Android so far… Will test with iOS tonight. Thanks again for this NoSleep method!

---

<div class="post-metadata">

### Author: ![hhuman](https://avatars.discourse-cdn.com/v4/letter/h/3be4f8/32.png) [@hhuman](https://community.thunkable.com/u/hhuman)
#### Post date: [December 7, 2019, 1:53am UTC](https://community.thunkable.com/t/superpost-possible-to-keep-screen-active-screen-on/63540/22 "2019-12-07T01:53:05Z")

</div>

Ok, so It’s still not working perfectly… including html file and js file in asset stopped working and when I tried to reproduce the result, clicking the Advance options tab of the webviewer would cause browser to refresh. So I tried including the Script in the header of the html file… and it works great! But not for all android devices. Some would give this error in the webviewer window: Domain: undefined Error Code: -1

What is this? Do you know what I can do about it?? Thanks for your help again.

---

<div class="post-metadata">

### Author: ![Chris](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/chris/32/78883_2.png) [@Chris](https://community.thunkable.com/u/Chris)
#### Post date: [December 7, 2019, 11:03am UTC](https://community.thunkable.com/t/superpost-possible-to-keep-screen-active-screen-on/63540/23 "2019-12-07T11:03:40Z")

</div>

Hey,

Yeah - this is what I meant that there are known issues in Thunkable X with offline html on Android 😬 Maybe try uploading it to a webspace until Thunkable hopefully fixes those errors 😬

Best, Chris

---

<div class="post-metadata">

### Author: ![hhuman](https://avatars.discourse-cdn.com/v4/letter/h/3be4f8/32.png) [@hhuman](https://community.thunkable.com/u/hhuman)
#### Post date: [December 7, 2019, 11:26pm UTC](https://community.thunkable.com/t/superpost-possible-to-keep-screen-active-screen-on/63540/24 "2019-12-07T23:26:18Z")

</div>

Ok, will do as you suggest. Thank you! Yes, I can’t wait for Thunkable make offline html smooth.

---

<div class="post-metadata">

### Author: ![hhuman](https://avatars.discourse-cdn.com/v4/letter/h/3be4f8/32.png) [@hhuman](https://community.thunkable.com/u/hhuman)
#### Post date: [February 1, 2020, 5:52pm UTC](https://community.thunkable.com/t/superpost-possible-to-keep-screen-active-screen-on/63540/25 "2020-02-01T17:52:20Z")

</div>

I created an html file with the NoSleep.js script in the header and hosted it at: [https://hencehuman.github.io/index.html](https://hencehuman.github.io/index.html)

In the webviewer, I just use that address and it works fine now. It requires the device be connected to the internet while loading up is all…

---

<div class="post-metadata">

### Author: ![rojroj101s](https://avatars.discourse-cdn.com/v4/letter/r/ec9cab/32.png) [@rojroj101s](https://community.thunkable.com/u/rojroj101s)
#### Post date: [March 14, 2020, 4:40am UTC](https://community.thunkable.com/t/superpost-possible-to-keep-screen-active-screen-on/63540/26 "2020-03-14T04:40:02Z")

</div>

Does the user have to click enable for the nosleep.js script to work… Is there a way where it make it enabled without clicking the button? I want to run this in the background without having the user click a button to keep their screen on…

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [March 14, 2020, 1:49pm UTC](https://community.thunkable.com/t/superpost-possible-to-keep-screen-active-screen-on/63540/27 "2020-03-14T13:49:15Z")

</div>

I am wondering about this too. Do you keep visible the portion of the webviewer where the button is, or does this somehow start on it’s own on the page load?

@hhuman @Chris

---

<div class="post-metadata">

### Author: ![hhuman](https://avatars.discourse-cdn.com/v4/letter/h/3be4f8/32.png) [@hhuman](https://community.thunkable.com/u/hhuman)
#### Post date: [March 14, 2020, 4:53pm UTC](https://community.thunkable.com/t/superpost-possible-to-keep-screen-active-screen-on/63540/28 "2020-03-14T16:53:24Z")

</div>

Yes, but only for some android devices though. Check this out: [Keep screen alive and / by user interaction](http://community.thunkable.com/t/keep-screen-alive-and-by-user-interaction/441309)

---

<div class="post-metadata">

### Author: ![hhuman](https://avatars.discourse-cdn.com/v4/letter/h/3be4f8/32.png) [@hhuman](https://community.thunkable.com/u/hhuman)
#### Post date: [March 14, 2020, 4:54pm UTC](https://community.thunkable.com/t/superpost-possible-to-keep-screen-active-screen-on/63540/29 "2020-03-14T16:54:46Z")

</div>

I made a small window using a row with a webviewer that once they click the enable button, they can click an x in the top right corner to hide the row.

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [March 14, 2020, 4:57pm UTC](https://community.thunkable.com/t/superpost-possible-to-keep-screen-active-screen-on/63540/30 "2020-03-14T16:57:48Z")

</div>

Thank you for such a quick reply!!!

---

<div class="post-metadata">

### Author: ![hhuman](https://avatars.discourse-cdn.com/v4/letter/h/3be4f8/32.png) [@hhuman](https://community.thunkable.com/u/hhuman)
#### Post date: [March 14, 2020, 8:20pm UTC](https://community.thunkable.com/t/superpost-possible-to-keep-screen-active-screen-on/63540/31 "2020-03-14T20:20:58Z")

</div>

You’re welcome. Thank you for kind acknowledgment!

---

<div class="post-metadata">

### Author: ![hhuman](https://avatars.discourse-cdn.com/v4/letter/h/3be4f8/32.png) [@hhuman](https://community.thunkable.com/u/hhuman)
#### Post date: [October 30, 2019, 1:24pm UTC](https://community.thunkable.com/t/superpost-possible-to-keep-screen-active-screen-on/63540/32 "2019-10-30T13:24:54Z")

</div>

Hi guys. I made a simple app with the video player and uploaded a 1 minute video to it. I have my screen timeout set to 30 seconds for testing. The screen times out at 30 seconds when the video is playing. Unless i expand it to fullscreen mode. Is this the way it is? Should not the screen stay on when a video is playing regardless? Thanks for your help!

---

<div class="post-metadata">

### Author: ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)
#### Post date: [October 31, 2019, 10:55am UTC](https://community.thunkable.com/t/superpost-possible-to-keep-screen-active-screen-on/63540/33 "2019-10-31T10:55:19Z")

</div>

What is the time to fall asleep is installed on your phone?

---

<div class="post-metadata">

### Author: ![hhuman](https://avatars.discourse-cdn.com/v4/letter/h/3be4f8/32.png) [@hhuman](https://community.thunkable.com/u/hhuman)
#### Post date: [October 31, 2019, 11:12am UTC](https://community.thunkable.com/t/superpost-possible-to-keep-screen-active-screen-on/63540/34 "2019-10-31T11:12:38Z")

</div>

Hi actech. I understand you would like to help me solve this problem or else you would not have replied. The thing about the time to fall asleep is not the concern here. I need my app to keep the phone screen on for as long as it is running. Hours. Unless you can help me to have it running while the screen is off as well which would be ideal. Without these two functions, we are being very limited by what we could build on cross platform. From what I am seeing, this community will be full of joy once we have this possible. Thank you for your attention.

---

<div class="post-metadata">

### Author: ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)
#### Post date: [October 31, 2019, 11:28am UTC](https://community.thunkable.com/t/superpost-possible-to-keep-screen-active-screen-on/63540/35 "2019-10-31T11:28:20Z")

</div>

I’ll check out your situation on my phone, and later write the answer.

---

<div class="post-metadata">

### Author: ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)
#### Post date: [October 31, 2019, 11:39am UTC](https://community.thunkable.com/t/superpost-possible-to-keep-screen-active-screen-on/63540/36 "2019-10-31T11:39:55Z")

</div>

See my link project. You screen dims after 30 seconds and everything is working fine?

[https://x.thunkable.com/projects/5dbac4cf1f0c0a55589b0693/project/properties/designer/](https://x.thunkable.com/projects/5dbac4cf1f0c0a55589b0693/project/properties/designer/)

---

<div class="post-metadata">

### Author: ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)
#### Post date: [October 31, 2019, 11:44am UTC](https://community.thunkable.com/t/superpost-possible-to-keep-screen-active-screen-on/63540/37 "2019-10-31T11:44:04Z")

</div>

To play a video I like WebViewer component. Why? The answer to this question can be found here.

[https://x.thunkable.com/projects/5dbac6e5228d17061fdb13f5/project/properties/designer/](https://x.thunkable.com/projects/5dbac6e5228d17061fdb13f5/project/properties/designer/)

---

<div class="post-metadata">

### Author: ![hhuman](https://avatars.discourse-cdn.com/v4/letter/h/3be4f8/32.png) [@hhuman](https://community.thunkable.com/u/hhuman)
#### Post date: [October 31, 2019, 2:53pm UTC](https://community.thunkable.com/t/superpost-possible-to-keep-screen-active-screen-on/63540/38 "2019-10-31T14:53:08Z")

</div>

Actech, thank you for replying again. The first link you sent with just the video player alone and nothing else on the screen plays as long as your eyes are facing the screen because of the Smart Stay feature. When you look away, even if the the video is still playing, the screen dims after 30 seconds, turns off after a second and the video stops as well.

The webviewer ones does keep the screen on, however can it play offline media asset? And can it autoplay?

This is the deal: I’m using a looping blank white video to keep the application running because I don’t know how else to do so. To bypass the screen timeout when the app is running is what I need.

To have the app running in the background is what I really, really need.

Is there an html5 script that we can use in webviewer to allow this?

Thank you for your expertise in helping me.

---

<div class="post-metadata">

### Author: ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)
#### Post date: [October 31, 2019, 3:16pm UTC](https://community.thunkable.com/t/superpost-possible-to-keep-screen-active-screen-on/63540/39 "2019-10-31T15:16:41Z")

</div>

On my phone does not have Smart Stay, but the settings in my sleep mode set at 30 minutes. With these points my screen does not turn off and everything is fine.

With Web Viewer I also do not have problems. I can watch streaming video or normal video and the screen does not turn off.

You can use HTML5, but beautiful solutions do not work.

---

<div class="post-metadata">

### Author: ![hhuman](https://avatars.discourse-cdn.com/v4/letter/h/3be4f8/32.png) [@hhuman](https://community.thunkable.com/u/hhuman)
#### Post date: [October 31, 2019, 4:46pm UTC](https://community.thunkable.com/t/superpost-possible-to-keep-screen-active-screen-on/63540/40 "2019-10-31T16:46:34Z")

</div>

Of course if you have sleep mode at 30 mins, the screen will stay on for 30 mins, right?

How do we expect the users of our app to adjust their screen timeout to 30 miutes as well? I believe we can serve our people better than that.

[Previous page](https://community.thunkable.com/t/superpost-possible-to-keep-screen-active-screen-on/63540.md?page=1)

[Next page](https://community.thunkable.com/t/superpost-possible-to-keep-screen-active-screen-on/63540.md?page=3)
