Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible for two instances of the same android app to exist simultaneously?

Tags:

android

In a general android app, is it possible for two process instances of the same app to exist simultaneously?

In other words, if I override Application.onCreate(), is it possible for onCreate() to get called when a previous instance of the app is still running in the underlying linux kernel?

like image 295
Lahiru Chandima Avatar asked Nov 22 '22 15:11

Lahiru Chandima


1 Answers

For any given application there will be at most one Application instance at any given time.

When an application component starts and the application does not have any other components running, the Android system starts a new Linux process for the application with a single thread of execution. source


[The Application class is] instantiated for you when the process for your application/package is created. source

like image 65
Michael Avatar answered Apr 21 '23 17:04

Michael