Top "Android-lifecycle" questions

Questions regarding the events forwarded by the system to components, during their lifetime, in an Android Application.

Android - Preserve or delete files created by the application on uninstall

I created an application which creates and stores files to sdcard. Is there a way to bind the folder with …

android backup uninstallation android-lifecycle android-backup-service
Android lifecycle library ViewModel using dagger 2

I have a ViewModel class just like the one defined in the Connecting ViewModel and repository section of Architecture guide. …

android android-lifecycle dagger-2
How to handle AsyncTask onPostExecute when paused to avoid IllegalStateException

I appreciate the numerous postings regarding AsyncTask on a rotation change. I have the following problem when using the compatability …

android android-asynctask android-fragments android-lifecycle
How to execute background task when Android app is closed / set to background?

My Android 4+ app is connected to a custom web service that is used to sync data every few minutes. To …

android android-asynctask background-process android-lifecycle
Android - While switching between two activities, the calling order of lifecycle methods of Activity

I want to start an Activity (SECOND Activity) from another Activity (FIRST Activity) by calling startActivity(intent). Before I actually …

android android-activity android-lifecycle
When is the savedInstanceState bundle actually used?

Does anyone know of an exhaustive list of when the savedInstanceState bundle will be used in an activity? I know …

android android-activity android-lifecycle
save the state when back button is pressed

I am developing an android app. If I press a back button the state of my application should be saved .…

android sharedpreferences android-lifecycle savestate
Android: Under what circumstances would a Dialog appearing cause onPause() to be called?

A snippet from the Android Activities document(scroll down to the "foreground lifetime" line) says : An activity can frequently transition …

android dialog lifecycle android-lifecycle onpause
When is the viewmodel onCleared called

Are ViewModels independent of activity/fragment lifecycles or just their configuration changes. When will they cease to exist and the …

android android-activity android-lifecycle android-viewmodel
What the equivalent of activity life cycle in iOS?

Actually, I would say that both iOS ViewControllers and Android Activities have their lifecycle methods. For example an equivalent of …

android ios objective-c mapping android-lifecycle