I'm currently developing an android app with eclipse. Basicaly when the home button is pressed, the app automaticaly call the onPause() method. In onPause() I put method to pause the background music. When the app is opened again, I'm want to put method to play the music but I don't know where to put it. Anyone know where to put method that we want to call 1st when the app is re-opened?
Asked
Active
Viewed 546 times
1
-
http://stackoverflow.com/questions/10349685/not-able-disable-home-button-on-specific-android-devices. you cannot override the default behaviour of home button (as of android 4.0 i guess). This is for security reasons. Home button is one sure short way to navigate to home screen. – Raghunandan May 25 '13 at 18:32
1 Answers
0
Anyone know where to put method that we want to call 1st when the app is re-opened
You have to put it in the onResume()
method.
Take a look at the Activity lifecycle:

Ahmad
- 69,608
- 17
- 111
- 137