Android onResume from Application -
my client wants app show "warning" screen when application starts or when awakens sleep. i've tried creating onresume() event in master activity (which every other activity inherits from), causes endless loop:
- activity called, onresume() fired
- warning screen fires, causing calling activity paused
- user clicks ok accept message, returning user prior screen
- activity woken up
- go 1
even if around endless loop, warning screen fire whenever new activity loads. call bad thing.
is there way mimic onresume() event @ application level rather @ activity level, can avoid these scenarios still have warning pop on application wake?
why not use sharedpreferences.
http://android-er.blogspot.com/2011/01/example-of-using-sharedpreferencesedito.html
store time popup brought up, , if within 5 mins, or something, don't pop up.
this break loop , not annoy user.
Comments
Post a Comment