Every app runs in their own processes (separate).
System process is always runs in background which are responsible for the storing the state of the activity when it goes in background and other come in foreground. eg page at particular scroll position.(This kind of data get stored in system process).
When there is no space for the new process then the most old process get killed.
Even your app get killed when in background say due to less memory / space. then there entry for navigation stack remain there and this entry is kept in the system process which runs always in background.
Even though app is killed and through navigation we come to particular page then its process gets invoked with the same state.( as state is stored in the system process). App restore the same state. System process keep the data of each activity separately.
No comments:
Post a Comment