How do I keep my app awake?

Not favoritedFavorited Favorited 0 favourites
  • 4 posts
From the Asset Store
Create your own casino app and import it to Google Play and the App Store.
  • Hello,

    I need some help with my Windows app.

    It's working through a day mostly sitting quietly in the task bar.

    It's running as expected, but when pc goes to sleep overnight it won't continue.

    Just sits there frozen, quiet, until I touch it...

    I'w tried some chatGTP advices like time counter so when it detects large time difference it means it was asleep, and it restarts itself... but timers are also asleep so that is not doing anything...

    Any ideas, please.... I'm loosing nights over this... :(

  • In general, you shouldn't do that because it will waste system resources. Either the operating system or browser will commonly put background apps to sleep to prevent wasting system resources, so this is not always something you can work around.

    The catch-up time example shows how you can essentially fast-forward time when resuming, and the offline builder example shows a simpler approach based on measuring how long the app was closed/asleep for. Both can create the impression of the app running in the background, but don't actually need it to be really running.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Mine app is a background type of app. It works i that sence that it has its internal timers that start certain actions. So app it self is not needed to be visible all the time. In fact that would be considered invasive. Its not a game but user application.

    Do you have any tips how to detect sleep/wake windows cycle and how to get her to continue working?

  • Well, Construct is a game engine, and so it's designed accordingly - normally everything fully suspends in the background because it's the most user-friendly thing to do and is sometimes a requirement for store publishing or some kinds of application certification. Construct provides the suspend and resume triggers so you know when it is changing state, but that's about it. If you truly need some process to run in the background, you could look at finding a third-party addon for running in the background, developing a custom wrapper extension for a desktop app, or just use a different tool such as a node.js service which is better suited to running like a server.

Jump to:
Active Users
There are 0 visitors browsing this topic (0 users and 0 guests)