1

I have a simple windows universal application (JavaScript) and it set to be used in kiosk mode for Win10 (build 10586). I have an issue, when the tablet is switched to sleep mode and wake up, app doesn't opened in the last state, it refreshed (I think the view above lock screen recreated). Is there any way to restore that state and/or prevent that view to be recreated. To reproduce that issue just create Blank App (Universal Windows) JavaScript, in main.js add following code

setTimeout(function () {
  document.getElementById('1').remove();
},2000);

and in index.html

<div id="1">Content goes here!</div>

In manifest file add so the app can be set in kiosk mode

<Extensions>
    <uap:Extension Category="windows.lockScreenCall" />
    <uap:Extension Category="windows.aboveLockScreen"/>
</Extensions>

Build app with MSBuild(14) and set it in kiosk mode. Wait while tablet goes to sleep mode or press power button, then switch it back, notice that div is appeared in screen again(app recreated).

AlexanderT
  • 167
  • 10

1 Answers1

0

According the guidelines your application should save state in suspending event and restore it in resuming event.

Here is example: App activate and suspend using WinJS sample

Alexej Sommer
  • 2,677
  • 1
  • 14
  • 25
  • when app runs in normal way(not in kiosk mode) it works normally, when you return from hibernation/sleep the system restores the running state of the whole system. But in kiosk mode this not the case(at least for Win10) it recreates app and I cant restore its state. I even created universal app with C#, blank app only with web-view which navigates to some url. In normal run mode after sleep web-view is shows content where you leave it, but in kiosk mode it just reopen initial url – AlexanderT May 05 '16 at 12:16
  • I have already answered as I can at this topic and at [this topic](http://stackoverflow.com/questions/36939547/assigned-access-application-exits-when-ctrl-alt-delete-is-pressed/36941576#36941576), so, may be ask for this feature in [connect](https://connect.microsoft.com/) – Alexej Sommer May 05 '16 at 12:38
  • yep, read that before, thanks! but unfortunately that doesn't solve my issue – AlexanderT May 05 '16 at 12:44