Re: [android-developers] Global variable extend application class
On Sun, Apr 8, 2012 at 10:45 PM, Etienne <lawloretienne@gmail.com> wrote:
I am using the application object to maintain global application state. What are the disadvantages of sub-classing the Application class? And what advantages do SharedPreferences have over my solution?
I do this as well. IMO this is a perfectly valid way of maintaining data that needs to be accessible from multiple Activities, Services, or other components.
SharedPreferences would not makes sense for maintaining state or for a complex data structure.
-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home