Android: How does Application class work with remote processes?
Say that my app implements a subclass of Application
has 2 different ser开发者_Python百科vices running different processes.
What happens if I call getApplication()
in each Service? Will I get back 2 completely independent instances, 1 for each process?
If so, then will the 2 instances be somehow linked? In other words, would modifications made to the instance in one process show up in the instance made in the other?
Say that my app implements a subclass of Application has 2 different services running different processes.
99.9999% of Android applications do not need this, and it wastes RAM, CPU, and battery.
Will I get back 2 completely independent instances, 1 for each process?
Of course. They are different processes.
If so, then will the 2 instances be somehow linked?
No.
精彩评论