I need help with Android. Here is problem I need to catch event when application went to background. (ex. home is pressed or any other action that push my app in backgound)
From your comment it sounds like you want to know when your program returns from the background, instead of when it goes to the background.
You can use onResume
for that. also, see the Activity Lifecycle. You can see the remark "activity comes to the foreground", which is what I gather from your comment the thing you want.
Note: your activity will call onResume
the first time the activity is started, so you might want to set a boolean in onPause to signal your app that it actually went to the background.