Re: [SailfishDevel] Forcing application to stay active and prevent screensaver.

2013-12-23 Thread Kimmo Lindholm
I noticed that when I use QtSensors (acceleration sensor) and I keep phone 
moving, it prevents screensaver not activating without touching the screen. If 
I let it stay in place, then screensaver activates.
(this is great as my app is completely controlled by gravitation..)

-kimmo

From: devel-boun...@lists.sailfishos.org 
[mailto:devel-boun...@lists.sailfishos.org] On Behalf Of Samuli Järvinen
Sent: Monday, December 23, 2013 9:00 PM
To: devel@lists.sailfishos.org
Subject: Re: [SailfishDevel] Forcing application to stay active and prevent 
screensaver.

Thanks,

Playing with ScreenSaver seems to work on emulator, but not on device. Also no 
errors on journalctl, so I guess the device handles the ScreenSaver at some 
level, but there is another mechanism for turning screen off.

-Samuli

On 23 Dec 2013, at 03:42, Gabriel Böhme 
m.gabrielboe...@googlemail.commailto:m.gabrielboe...@googlemail.com wrote:


Hi,

the ScreenSaver function from QML SystemInformation should allow to keep the 
screen alive, BUT: this is not allowed for import in harbour applications at 
the moment. Due to the fact it's possibly not API stable. It was included in 
QtMobility in Qt4.x, but is now split up and got maybe some changes in Qt5. It 
worked in Harmattan and is also in SDK, if you don't want to release at harbour 
give it a try.

For charger - no idea, how to get this info at all, maybe also with 
SystemInformation, you could check the old Qt4 Docs.

Cheers, Gabriel.


--


Von meinem Nokia N9 gesendet




Samuli Järvinen schrieb am 23.12.13 00:33:
Hi,

I know this is something that more often than not should not happen. However I 
could not be more annoyed when the screen goes blank and I'm watching for 
example my position on screen and waiting for a gps fix. So short question. Is 
there a way to prevent application from going background and to prevent the 
screen from blanking via qml?

Another question, is it possible to detect if a charger is plugged in from QML 
or does it need .js or cpp code?

Thanks in advance,

-Samuli
___
SailfishOS.orghttp://SailfishOS.org Devel mailing list


___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Forcing application to stay active and prevent screensaver.

2013-12-23 Thread Samuli Järvinen
Thanks,

Playing with ScreenSaver seems to work on emulator, but not on device. Also no 
errors on journalctl, so I guess the device handles the ScreenSaver at some 
level, but there is another mechanism for turning screen off.

-Samuli

On 23 Dec 2013, at 03:42, Gabriel Böhme m.gabrielboe...@googlemail.com wrote:

 Hi,
 
 the ScreenSaver function from QML SystemInformation should allow to keep the 
 screen alive, BUT: this is not allowed for import in harbour applications at 
 the moment. Due to the fact it's possibly not API stable. It was included in 
 QtMobility in Qt4.x, but is now split up and got maybe some changes in Qt5. 
 It worked in Harmattan and is also in SDK, if you don't want to release at 
 harbour give it a try.
 
 For charger - no idea, how to get this info at all, maybe also with 
 SystemInformation, you could check the old Qt4 Docs.
 
 Cheers, Gabriel.
  
 --
  
 Von meinem Nokia N9 gesendet
  
 
 Samuli Järvinen schrieb am 23.12.13 00:33:
 Hi,
 
 I know this is something that more often than not should not happen. However 
 I could not be more annoyed when the screen goes blank and I’m watching for 
 example my position on screen and waiting for a gps fix. So short question. 
 Is there a way to prevent application from going background and to prevent 
 the screen from blanking via qml?
 
 Another question, is it possible to detect if a charger is plugged in from 
 QML or does it need .js or cpp code?
 
 Thanks in advance,
 
 -Samuli
 ___
 SailfishOS.org Devel mailing list
 

___
SailfishOS.org Devel mailing list

[SailfishDevel] Forcing application to stay active and prevent screensaver.

2013-12-22 Thread Samuli Järvinen
Hi,

I know this is something that more often than not should not happen. However I 
could not be more annoyed when the screen goes blank and I’m watching for 
example my position on screen and waiting for a gps fix. So short question. Is 
there a way to prevent application from going background and to prevent the 
screen from blanking via qml?

Another question, is it possible to detect if a charger is plugged in from QML 
or does it need .js or cpp code?

Thanks in advance,

-Samuli
___
SailfishOS.org Devel mailing list