When to call activity context OR application context?

后端 未结 7 1431
野的像风
野的像风 2020-11-21 06:10

There has been a lot of posting about what these two contexts are.. But I\'m still not getting it quite right

As I understand it so far: Each is an instance of its c

7条回答
  •  名媛妹妹
    2020-11-21 06:22

    Application context live untill your application is alive only and it is not depend on Activity Life Cycle but, context keep object long-lived. If the object which you are used temporary, that time use Application Context and Activity Context is used totally oposite of Application Context.

提交回复
热议问题