I am trying to write an app that does something specific when it is brought back to the foreground after some amount of time. Is there a way to detect when an app is sent to
These answers don't seem to be correct. These methods are also called when another activity starts and ends. What you can do is keep a global flag (yes, globals are bad:) and set this to true each time you start a new activity. Set it to false in the onCreate of each activity. Then, in the onPause you check this flag. If it's false, your app is going into the background, or it's getting killed.