java - Android how to kill process when home button pressed -
this question has answer here:
alright, basically, want able force users go through first activity everytime bring app up, checks updates. since later versions of android prevent me overriding home button, had relied on calling onstop method force process kill itself, forcing reload when app opened again.
problem is, cannot transition new activities without onstop method being called. there other way accomplish this, or keep onstop method being called on activity transition?
i'd avoid messing activity lifecycle
@ cost. if want app start it's first activity every time, that's counter-intuitive android users used ... might cause surprisingly more negative comments expected.
if "checks updates" need do, why don't in onresume()
in activities (hopefully you're using sort of baseactivity
in app others extend, it's gonna 2 lines of code add it)? if need update, redirect them update interface there (or whatever action decide).
Comments
Post a Comment