javascript - UWP App crash on phone lock while playing video -


it javascript based uwp application. application listening checkpoint/resume event described on msdn samples. on checkpoint i'm saving state of application history. how can prevent application crashing? exact sequence of events occur when phone locked.

on checkpoint:

app.oncheckpoint = function (args) {     try {         args.setpromise(ax.utils.delay(1000).then(function (r) {             winjs.application.sessionstate.history = {}; //json string             return true;         }));     } catch (e) {      } }; 

debugging visual studio using lifecycle state works well.


Comments