I have an activity say A from which I am starting an activity say B through startActivity(). How do I pause/resume activity开发者_JAVA百科 B from activity A?
How do I pause/resume activity B from activity A?
You can't, sorry. Most likely, no code from Activity A is even running while Activity B is on-screen.
It's a little difficult to determine what you're asking for. If you simply want to end Activity A and go back to Activity B, then you would call finish() to kill Activity A, or even just use the Back button to end it and go back...
onPause() and onResume are part of an Activity's life cycle. They are called by the Android framework and should never be called explicitly.
精彩评论