i am developing an android app.
I have some activities in it. And i must have an object which can be available from all activities.
Any ideas how to organize it?
i am developing an android app. I have some activities in it. And i
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use the global
Applicationobject in the following way:In
AndroidManifest.xml:To access it from an
Activity:The
Appclass will be instantiated automatically when the app starts. It will be available as long as the application process is alive. It can act as a global store in which you can put your things and have access to them throughout the application lifetime.