Which of the following methods is called first in an Activity when another activity gets into the foreground?
Which of the following methods is called first in an Activity when another activity gets into the foreground?
When another activity comes into the foreground, the current activity first calls the onPause() method. This allows the activity to pause ongoing tasks and release resources that may be needed by the new activity.
B. onPause()