android - Saving battery life with finish() and explicit Exit buttons? -


in app i'm implementing many finish() methods between activities. should doing this? think because i'm helping conserve user's battery. true?

also, google apps don't implement exit button in applications. see in many games have exit button. should apps implement exit button? or perhaps apps it's not necessary, in videogames is?

finishing activity programmatically absolutely ok. however, aware shouldn't store reference activity outside of (if that's meant saying finish activities between each other) because creates context leak. every context leak cost megabyte of memory. read more here: http://android-developers.blogspot.com/2009/01/avoiding-memory-leaks.html

reg. "exit" button - actually, implementing bad idea. keeping data in ram takes less power creating data executing code in cpu. it's preferred once data created on first launch it's kept in memory rather re-doing every launch. saves battery. that's why android's lifecycle designed in way is. killing app clear data memory means on next launch cpu consume battery re-create it. by allowing "exit" option harm users, not them. and, way, properly implementing exit in android app difficult, won't work anyway ;)

-- update: renaud added point , totally agree, see post


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -