Basic Android Application Movement

Asked 2 years ago, Updated 2 years ago, 35 views

I'm looking into the Android app movement, but I'm not sure, so I have a question.
Processes, components, threads, tasks, etc.

https://developer.android.com/guide/topics/fundamentals?hl=ja

I understood the process and components above, but
I can't really grasp the overall relationship.I don't know if my perception is correct, so
Could you please let me know if the following recognition is incorrect?

·Apps with Activity and Service do not specifically set processes in manifesto
·Run the service with startService and return value of onStartCommand is START_NOT_STICKY

1 OS may terminate an exitable process to secure memory
2 When a process is terminated, the components running in the process are terminated too
3In some cases, only terminated components in the process may be terminated to secure memory.
4 Terminating app components does not immediately terminate the process
 (Sometimes it ends?)
5 Asynchronous thread processing does not end immediately (?) when a process or component is terminated.
6 If you exit the application from the back key, task screen (screen that can be displayed with the □ button), or
 If you exit an application from a configuration application, you are exiting the application process
7savedInstanceState provides
Activity to change Activity settings (e.g., screen rotation) and free memory  If finished, there are contents, and if Activity ends with steps like 6, it is null.

Thank you for your cooperation.

android

2022-09-29 22:36

1 Answers

To be honest, I remember it vaguely, but I think it was like the following.

Note: There was a mistake regarding number 7, so I am correcting the answer.


2022-09-29 22:36

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.