java - singleton class that survives Process termination -
i've read several post regarding singleton class destruction or singleton pattern bad in android this , this
but not able understand how declare singleton class or use sharedpreference persistance can provide example on how maintain global objects across application or how achieve in proper way appreciated.
i think this link mentioned quite good.as personal experience best way maintain global objects in application use class extends application class, can manage objects setter , getter methods in class.this technically works singleton in android except of house keeping done android it's wise use mechanism instead of singleton. on other hand shared preferences
has entirely different job , used storing user data , behavior
Comments
Post a Comment