<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:NokiaPureTextLight;
panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
span.Shkpostityyli18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 2.0cm 70.85pt 2.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">(this is great as my app is completely controlled by “gravitation”..)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">-kimmo<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="FI" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="FI" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> devel-bounces@lists.sailfishos.org [mailto:devel-bounces@lists.sailfishos.org]
<b>On Behalf Of </b>Samuli Järvinen<br>
<b>Sent:</b> Monday, December 23, 2013 9:00 PM<br>
<b>To:</b> devel@lists.sailfishos.org<br>
<b>Subject:</b> Re: [SailfishDevel] Forcing application to stay active and prevent screensaver.<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">-Samuli<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On 23 Dec 2013, at 03:42, Gabriel Böhme <<a href="mailto:m.gabrielboehme@googlemail.com">m.gabrielboehme@googlemail.com</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<div>
<div id="fenix-user-content">
<div>
<p class="MsoNormal"><span style="font-family:"NokiaPureTextLight","serif"">Hi,</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"NokiaPureTextLight","serif""><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"NokiaPureTextLight","serif"">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.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"NokiaPureTextLight","serif""><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"NokiaPureTextLight","serif"">For charger - no idea, how to get this info at all, maybe also with SystemInformation, you could check the old Qt4 Docs.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"NokiaPureTextLight","serif""><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"NokiaPureTextLight","serif"">Cheers, Gabriel.</span><o:p></o:p></p>
</div>
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-family:"NokiaPureTextLight","serif""> </span><o:p></o:p></p>
<div>
<p class="MsoNormal"><span style="font-family:"NokiaPureTextLight","serif"">--</span><o:p></o:p></p>
</div>
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-family:"NokiaPureTextLight","serif""> </span><o:p></o:p></p>
<div>
<p class="MsoNormal"><span style="font-family:"NokiaPureTextLight","serif"">Von meinem Nokia N9 gesendet</span><o:p></o:p></p>
</div>
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-family:"NokiaPureTextLight","serif""> </span><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div id="fenix-reply-header">
<p>Samuli Järvinen schrieb am 23.12.13 00:33:<o:p></o:p></p>
</div>
<div id="fenix-quoted-body">
<p class="MsoNormal">Hi,<br>
<br>
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?<br>
<br>
Another question, is it possible to detect if a charger is plugged in from QML or does it need .js or cpp code?<br>
<br>
Thanks in advance,<br>
<br>
-Samuli<br>
_______________________________________________<br>
<a href="http://SailfishOS.org">SailfishOS.org</a> Devel mailing list<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>