Which of the following methods is first called in an Activity when another activity gets into the foreground? A. onStop
B. onPause
C. onDestroy
D. onExit
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The correct answer is B. onPause.
When another activity comes into the foreground, the current activity goes through several lifecycle methods. The first one called is `onPause()`, which indicates that the activity is partially obscured and no longer in the foreground. After `onPause()`, the `onStop()` method is called if the activity is completely hidden.
If you have more questions about Android activity lifecycle or other topics, feel free to ask or check the extended services page for further assistance!