Thursday, August 22, 2013

Detecting If An Android App Is In The Background

Was trying to understand when does my app go to the background. The Activity lifecycle methods does not help, as they can be called when switching between activities inside my app.
After a bit of googling, I found this:

Very good, and works like a charm, but please replace the calls to commit() with calls to apply() - see my previous post here:

No comments:

Post a Comment