Skip to content

Instantly share code, notes, and snippets.

@ToshihiroGoto
Created December 17, 2015 16:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ToshihiroGoto/462be736b5d78ab6ef1f to your computer and use it in GitHub Desktop.
Save ToshihiroGoto/462be736b5d78ab6ef1f to your computer and use it in GitHub Desktop.
(function () {
"use strict";
var app = WinJS.Application;
var activation = Windows.ApplicationModel.Activation;
app.onactivated = function (args) {
if (args.detail.kind === activation.ActivationKind.launch) {
if (args.detail.previousExecutionState !== activation.ApplicationExecutionState.terminated) {
// TODO: This application has been newly launched. Initialize your application here.
var s = Windows.UI.ViewManagement.StatusBar.getForCurrentView();
s.showAsync();
} else {
// TODO: This application was suspended and then terminated.
// To create a smooth user experience, restore application state here so that it looks like the app never stopped running.
}
args.setPromise(WinJS.UI.processAll());
}
};
app.oncheckpoint = function (args) {
// TODO: This application is about to be suspended. Save any state that needs to persist across suspensions here.
// You might use the WinJS.Application.sessionState object, which is automatically saved and restored across suspension.
// If you need to complete an asynchronous operation before your application is suspended, call args.setPromise().
};
app.start();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment