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: http://www.apptentive.com/blog/detecting-android-app-starts-and-stops/

Very good, and works like a charm, but please replace the calls to commit() with calls to apply() - see my previous post here: http://srooltheknife.blogspot.com/2013/08/stackoverflow-programming.html


No comments:

Post a Comment