Search code examples
javaandroidonresume

Android:What will happen if onResume method is not called on android activity?


For example, I have an activity named MyActivity and it doesn't have the function onResume().

So basically what would happen if I resume the activity? Will it call the onCreate() method or something else?


Solution

  • Even if you didn't write the delegate methods like onResume(), onDestroy(), onPause etc.. those standard life cycle methods will meet all the times when you do the respected activity in the screen.

    Whenever you need some functionality to be executed in specific delegate then you would need to override the method in your activity screen java file and put your functionality related code inside the overrided method.