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:

  1. activity called, onresume() fired
  2. warning screen fires, causing calling activity paused
  3. user clicks ok accept message, returning user prior screen
  4. activity woken up
  5. 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

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -