Android: Does an app only have one Context object -


I'm confused about the concept of class context I think that this Activity is the base class of , but Android Docks also mentions reference to the collection of global information about the Epe Environment. So what are the 3 activities in my app, does it mean that I have 3 different reference items, or do they actually mention 1 unit?

In addition to this, what is the life span of any subject matter - does it survive till then the last component of this activity is collecting garbage?

To create a reference docs gives a clue what is going on: / P>

By this method, each call gives a new example of a reference object; Context items are not shared, although they share the general condition (resource, classloader, etc.), so the reference example itself is quite light.

Because activity examples are often created / destroyed, and one activity is a reference, it makes sense. Context examples are only close to the various bits of an application, which themselves stay for a long time, but the example itself is not.


Comments