Top "Activity-lifecycle" questions

Activities in the system are managed as an activity stack.

onCreate(Bundle savedInstanceState) in always null

I know, this question is asked before on stackoverflow, but non of the answers worked for me. Probably worth mentioning: …

android android-lifecycle activity-lifecycle
BufferQueue has been abandoned: When playing video with TextureView

Every time I pause my activity (actually Fragment) to go to another app, upon returning with onResume I try to …

android video surfaceview activity-lifecycle textureview
onStop vs onDestroy

I have tried to research exactly when the onDestroy method is called for an activity, but I've read some confusing …

android android-activity activity-lifecycle
OnPause and OnStop() called immediately after starting activity

I have an activity that needs to turn screen on(if offed) when it is started. So in onCreate, I …

android android-activity wakelock activity-lifecycle
Simulate killing of activity in emulator

I would like to test out onSaveInstanceState and onRestoreInstanceState for my app on the emulator. I have found this, which …

android android-activity activity-lifecycle
Prevent Android activity from being recreated on turning screen off

How to prevent an activity from being recreated on turning screen off? What I do Start Bejewels and go to …

android-intent android-activity lifecycle lifetime activity-lifecycle
Is there a function in Android analogous to "int main" in C/C++ which contains the program's main loop?

Normally in a C or C++ program there's a main loop/function, usually int main (). Is there a similar function …

java android activity-lifecycle
How to simulate killing activity to conserve memory?

Android doc say: "When the system, rather than the user, shuts down an activity to conserve memory, ... " But how to …

android activity-lifecycle onrestoreinstancestate
Lifecycle of a session cookie in an Android WebView / CookieSyncManager

I have an Android application which makes requests to my webserver via both a WebView and an HttpClient. I sync …

android-webview session-cookies activity-lifecycle
How to trigger onPause programmatically in android activity

I am trying to work out how I can simulate pausing an activity for debugging my app. I want onPause …

android activity-lifecycle