Sign in to follow this  
g7tommyB

Disabling the Screen Saver

Recommended Posts

Hello, I have a problem with the device screen saver. During long in-game pauses the device native screen saver kicks in. I was wondering if anyone knows how to disable the device's screen saver from within Java (J2ME). This is definitely possible, since I have seen it in several Java apps that I have on the phone. Many Thanks, =g7tommyB=

Share this post


Link to post
Share on other sites
The Nokia UI has a function DeviceControl.setLights that'll do this. There's no non-proprietary way to do it in either MIDP 1.0 or MIDP 2.0.

Share this post


Link to post
Share on other sites
DeviceControl.setLights() seems not to work on Series 60 - or is there some trick to it? On Series 40 you just call it once at startup and the backlight sticks on... I thought I saw some vague reference in some Nokia doc to calling it in a loop though...

Quote:
Nokia Series 60 J2ME™ Game Usability Guidelines and Implementation Model

If the backlight goes off during a game, it is difficult for a player to see what to do. If the user presses a key to get the light back, the application will probably react to it just like any other key press, and it might affect the game. Also, many phones turn the light off after 15 seconds of idle time. That's a pretty short time for some games. There is no way for a MIDP 1.0 application to know the status of the backlight, but it is possible to turn it on with DeviceControl.setLights. The game should turn the light on every 14 seconds, so that it never goes off during game play. Approximately a minute should go by before the phone turns the light off. If the application knows the light status, developers should have the game pause when the backlight turns off.


Which is a bit confusing and seemingly self-contradictory, but it suggests adding a periodic setLights() call in the main game loop. Seems worth a shot...

Share this post


Link to post
Share on other sites
Some Java apps that I've run on the 3650 somehow turn of the screen saver and the screen saver does not interfere with the game.
Whether they do this by utilizing DeviceControl or not, I am not sure. I have read that DeviceControl is broken on all S60 (MIDP 1.0) not just the 3650. But perhaps, even though, periodic invocation of SetLights will not keep the back light on, it might just prevent the screen saver from kicking in.
What do you guys think? Worth a shot anyways.
I will try it and post my results here...

Share this post


Link to post
Share on other sites
I guess this is what $3000.00 USD /year will buy you from Nokia - access to information such as this. I've spend the past few days looking for info on this but can't find $hit.
I won't even mention how much time I've spent getting MMAPI to work properly on the S60s. Again zero documentation on the subject. On the forums, everyone has different ways of allegedly getting MMAPI to work, but not a single way is correct and no one lists the main limitations of MMAPI on the S60 and all the problems associated with playing midis.
I guess the device vendors have to make their money off engineering support and the big developers need all the competitive advantages money can buy to stay on top.
That's capitalism for you boys. What do small developers get from vendors? Crappy implementation of the KVM with ton of problems, tons of unrelated docs, but complete lack of proper docs & known issues. We are often left wondering wtf and spending days experimenting and trying to find solutions...
We should establish "small developers movement" to get this straightened out.

Anyway, I am still curious if anybody know how to make this work...

Share this post


Link to post
Share on other sites
Quote:
Original post by g7tommyB
So how do you think others do it shmoove? Any theories?

Cheers,
=g7=

No idea. All I know is that I haven't done it :(

There might be some undocumented APIs involved, who knows? Many manufacturers have quite a few of those, but if anyone tells you about them they will be violating an NDA (at least that's the response I got when talking about an unrelated issue with a Motorola rep).

shmoove

Share this post


Link to post
Share on other sites
IF there is an app that implements this (or does not suffer from the problem) them decompile it! I think shmoove knows all about the black arts of reverse engineering! Tut tut tut!

Then see what they have done! Post back here if you can then with the answer!

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Decompiling proprietary & copyrighted source is illegal and we do not want to promote illegal activities on this forum.
Rather, I would like to see this issue addressed by device manufacturers who can publish the full extent of their proprietary APIs and make them available to the public and not just to those that can afford the $3000 USD / year.
Otherwise, smaller players will be at a disadvantage here and in the end this may have negative implications on consumers. Putting smaller players at a disadvantage by not providing complete API specifications impedes perfect competition and works against pushing the envelope in mobile games. Perfect information and perfect competition should be strongly encouraged and supported in this still emerging mobile gaming market.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this