Search code examples
androidmultithreadingnetworkonmainthread

Android main thread - is it shared with other apps


Imagine we have two apps opened at the same time (like how samsung splits the screen and allows two apps to run at the same time). Do these two apps share the main thread ? My question really is does each app opened get its own main thread ? or is it one thread that they all share ?


Solution

  • Do these two apps share the main thread ?

    Not normally, as normally they are in separate processes.

    My question really is does each app opened get its own main thread ?

    Each process gets its own main thread. Each app gets its own individual process by default.