Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Control ScreenSaver mess with render

i needed to privent the screen from going to sleep ,, so i used "Control ScreenSaver " node in GmaeMode blueprint and it causes the wrong rendering

so in order to avoid that i used a delay of 0.8s (anything below 0.6s won't work for me at least) which fix the issue of miss rendering but it will make the screen to make a black interruption like a flick (if those are the right terminologies) in another word the screen goes full black for something like 0.2s then the render is ok.

i only tested that with Android 5.1.1 (one plus one) UE4 4.9.2 lunch version total blueprint project

the differences:

bad render only happens one as the the node being called alt text

go back to normal as i reload the level alt text

Product Version: UE 4.9
more ▼

asked Nov 09 '15 at 02:29 PM in Bug Reports

avatar image

27 6 10 13

avatar image Logan Bailey ♦♦ STAFF Nov 09 '15 at 06:03 PM

Hello sarkawt909,

Can you post a screenshot of how you have your blueprint set up where you are calling the "Control ScreenSaver?"

From your description I believe what you are trying to do is prevent the phone from going to sleep mode if you leave it alone and keep the game and phone active while in game.

Let me know if this is right or if what you are trying to achieve is different from this.


avatar image sarkawt909 Nov 10 '15 at 12:39 PM

yes i want to keep the android phone from going to sleep, as i am only use tilt for controlling and the user will not need to touch the screen frequently so i need the screen be on at least during game play inside level.

i have two game mode one for playing and one for main menu, that's why i decided to use the node inside the game mode, i tried with both construct and at begin play, both with the same problem ...

it seem that if you call the "control screensaver" during level load, it will cause the render of the level to be interrupted. (that'a my opinion, i might be wrong)

so finally i used a delay of 0.8s so the call for "control screen save" will be after level load, but it came with a price of black blink .lol

i thought that may be because of my deivce (one plus one), but we tried on HTC it was the same.

alt text

screensaver.png (293.0 kB)
avatar image sarkawt909 Nov 11 '15 at 03:12 PM

thanks Logan Bailey

that was what i was looking for now there is no need for using "Control ScreenSaver" node,

but as far as i understand the AndroidThunkJava_KeepScreenOn(true); will be applied for any other project that i may have , it is perfect

thanks again.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

You need to edit GameActivity.java file. It's located in "Unreal Engine\4.9\Engine\Build\Android\Java\src\com\epicgames\ue4" and add this line AndroidThunkJava_KeepScreenOn(true); after "nativeResumeMainInit();"

This should keep the android screen on while the game is running.

more ▼

answered Nov 11 '15 at 02:25 PM

avatar image sarkawt909 Nov 22 '15 at 01:50 PM

achieving the same thing on IOS too, would be amazing

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Oh my.. i just noticed that the notepad file is turned into a .java.template file and was not working because of that possibly. so beware of that if you change the java file, you have to rename it .java but now im not totally sure what it needs to be called.. i changed it back to .java and it couldn't find it so .template it is, and my game still wont stay open :(

more ▼

answered Dec 01 '18 at 06:51 AM

avatar image

9 3 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question