Delete temporary images when app is closed - Android -
in application create new image files images picked gallery. these new image files compressed versions of counterparts in gallery.
when click submit button
these files sent server. after confirmation of response server these temporary files deleted.
my question if close app once have selected images , before online submission, temporary (compressed) files stay in memory.
what best approach have cleanup method executes , removes temporary image files if any, when app closed. overriding ondestroy()
right approach?
use these 2 method :
onsaveinstancestate() , ondestroy() . write clear memory code in method . if app in background , close onsaveinstance called , direct close app ondestroy called.
Comments
Post a Comment