Android Question Why is Activity_Create called when Android is killing an app?

Discussion in 'Android Questions' started by PhilipBrown, Mar 4, 2015.

  1. PhilipBrown

    PhilipBrown Active Member Licensed User

    According to section 9.4 of Klaus' Beginners Guide, Activity_Create is called "when the activity was in the background and the OS decided to destroy it in order to free memory".
    This seems a little extraordinary to me. Why would Activity_Create be destroyed during the kill? Is there any way of detecting that the activity is being killed? I have tried tracking this in the log and can't see any sign that this Sub is being called.
  2. thedesolatesoul

    thedesolatesoul Expert Licensed User

    He means:
    If it went to the background, and the OS destroyed it, but the user brings it back to the foreground either through the recents list or clicking on the app launcher icon.
    Its not called when its in the background.
    Peter Simpson, NJDude and DonManfred like this.
  3. PhilipBrown

    PhilipBrown Active Member Licensed User

    Thanks. That's clarified the situation.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice