Search code examples
cpebble-watchpebble-sdk

Proper exit the Pebble app_event_loop function


I am developing an application for the Pebble smartwatch. An essential part of a Pebble C application is the app_event_loop() function. I was wondering whats the correct way to exit this loop?


Solution

  • You don't need to explicitly exit the loop - this will happen automatically when the user presses the back button when on the top-level window.

    If you wish to do so programatically then you can invoke window_stack_pop_all to pop all the windows off the stack and thus exit your app.