I have a game application with 2 activities. The first main activity
only has a list of different actions, on clicking any of the list
items, the second game activity launches housing the game board.
Everything is working fine, but if I rotate the screen (Ctrl+F11 on
the emulator), the second (top) game activity is destroyed and
recreated (as it should). But during recreation, immediately after the
onResume() call, onPause() is getting called automatically. As a
result the top game activity never becomes visible to the user, after
screen rotation. Rather the first main activity gets shown. :-(
Also in the LogCat I can see the following warning
WARN/ActivityManager(48): Activity pause timeout for HistoryRecord...
Can anyone please help me, on how to get out of this "Activity pause
timeout", and any clue on why onPause() is getting called immediately
after onResume(), after screen rotation and recreation of the top
activity? What is the value of this pause timeout, and under which
condition is this timeout fired?
Here is the LogCat output snippet
:17.716: INFO/WindowManager(48): Input configuration changed: ...
(<<< Screen rotated)
:17.945: DEBUG/GameActivity(163): onPause() gameactiv...@433d5d70
:18.016: DEBUG/GameActivity(163): onStop() gameactiv...@433d5d70
:18.225: DEBUG/GameActivity(163): onDestroy() gameactiv...@433d5d70
:18.336: DEBUG/GameActivity(163): onCreate() gameactiv...@4339de98
(<<< Game activity recreated)
:18.785: WARN/ActivityManager(48): Activity pause timeout for
HistoryRecord{...GameActivity}} (<<< This is the warning)
:18.796: DEBUG/StatusBar(48): updateResources
:18.836: DEBUG/GameActivity(163): onStart() gameactiv...@4339de98
:18.865: DEBUG/GameActivity(163): onResume() gameactiv...@4339de98
:19.095: DEBUG/GameActivity(163): onPause() gameactiv...@4339de98 (<<<
Pause immediately after resume, never shown to user)
:19.285: DEBUG/MainActivity(163): onCreate() mainactiv...@433b46b8
:19.385: DEBUG/MainActivity(163): onResume() mainactiv...@433b46b8
(<<< First main activity shown instead)
Thanks in advance...
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en