Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed bug 3511 - documentation to end an Android application
  • Loading branch information
1bsyl committed Dec 30, 2018
1 parent 9cdd0dd commit d09774a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/README-android.md
Expand Up @@ -408,6 +408,24 @@ screen each frame.
Reference: http://www.khronos.org/registry/egl/specs/EGLTechNote0001.html


================================================================================
Ending your application
================================================================================

Two legitimate ways:

- return from your main() function. Java side will automatically terminate the
Activity by calling Activity.finish().

- Android OS can decide to terminate your application by calling onDestroy()
(see Activity life cycle). Your application will receive a SDL_QUIT event you
can handle to save things and quit.

Don't call exit() as it stops the activity badly.

NB: "Back button" can be handled as a SDL_KEYDOWN/UP events, with Keycode
SDLK_AC_BACK, for any purpose.

================================================================================
Known issues
================================================================================
Expand Down

0 comments on commit d09774a

Please sign in to comment.