Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8345213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:36:40+00:00 2026-06-09T06:36:40+00:00

I asked this question about how to capture visibility changes in a metro app:

  • 0

I asked this question about how to capture visibility changes in a metro app:
How to tell if JS Windows8 metro app is visible or not

And it seems like there two answers:
1) checkpoint will be called about 10 seconds after the app loses focuses because the app will be suspended

2) the page visibility events will work.

However, when I do the following in my default.js I don’t see either of these things happening:

var onVisibilityChange = function (args) {
  console.log("Visibility changed. (this will never appear");
};
app.addEventListener("visibilitychange", onVisibilityChange);

// ...

app.oncheckpoint = function (args) {
  console.log("APP onCheckpoint (this also never appears");
};

Does anybody have an example of capturing when the app starts/stops being visible that works?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T06:36:41+00:00Added an answer on June 9, 2026 at 6:36 am

    For visibility, you need to use the document:

    document.addEventListener("visibilitychange", function() {
        console.log("Visible: " + !document.hidden);
    })
    

    For Checkpoint, your code is correct but note:

    • Suspend/Resume does not happen automatically with the debugger attached. You need to use the toolbar in Visual studio for controlling the suspend state.
    • Your console.log won’t show up till the app is resumed (unclear why, probably some cache), hower you can verify it’s executed before being suspended by setting a breakpoint on that line, and using the VS toolbar button
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I asked this question about using the system-drawables in an Android-app some time ago:
This Question asked about listing directories (not files) in the current directory. I noted
Krumelur asked this question about how create a recipient bubble similar to the mail.app.
I asked this morning a question about a jQuery code that's not working (which
I saw this question asked about C# I would like an answer for PHP.
I'm surprised that not more has been asked about this :-) My app is
Note: I originally asked this question about an hour ago but only recently realized
A few days ago I asked this question about jquery ajax function invoking action
Yesterday I asked this general question about decimals and their internal precisions. Here is
I asked a question about different testing frameworks yesterday. This question can be found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.