App Lifecycle

Former Member
Former Member
According to the documentation, an application is killed when it's last page is removed. However, I would like to create an application that acts as an alarm. At a specific point in time I would like the application to launch or push a page. In other words, I would like a small piece of the application to run in the background. Is this possible?
  • The short answer is for multiple reasons (resources, battery life) apps can't run in the background. We are working on a way for apps to schedule alarms for themselves that don't involves "waking up" the app, but would wake up the app if the user takes the notification.
  • Former Member
    Former Member over 9 years ago
    Background notifications or waking up for widgets

    Hi, I'm programming a notification widget. I'd like to notify user at the certain time, and they may not be viewing the widget at that time.
    I came across this thread that relates to this issue. Is there any update on this background wakeup/notify feature in CIQ?
  • Former Member
    Former Member over 9 years ago
    Thanks Travis, I was wondering about the onEvent wakeup call receiver, just wasnt able to find the caller. So I'll wait for the SDK update till some sort of notification is available. Is there any scheduled release for that?
  • I think that for Garmin, to be able to compete with Android Wear and Apple Watch in a couple of years, it will be absolutely essential to have comparable app platform. And comparable app platform will need to have some notification / background task system, otherwise it would not be comparable...

    I understand the differences between general use smart-watch and underpowered purpose-specific watch, but at the end of the day, they will compete on the same market. So I really hope that sometime not too far away, Garmin will introduce some major improvements to CIQ :-)
  • The framework invokes that callback (just like the framework calls onStart(), onStop, and onSettingsChanged() functions). In order to schedule the wakeup, you need to create an event object and register it with the system via a call to Events.scheduleEvent(), something like this...

    // as of the 1.2.0 SDK, this was the only supported Event type
    var notification = new Events.Notification(Time.now().add(new Time.Duration(30)), "Hello World", {}, {});

    // schedule the event and get a reference to the event in the scheduler
    var eventId = Events.scheduleEvent(notification);


    I don't know anything about timeline, but Brian did say it was likely to come back in the 1.2.x or 2.x time frame.
  • Former Member
    Former Member over 9 years ago
    Thank you.