android - SnackBar - Exponential Backoff with Retry functionality -


i trying use snackbar notify users, if not connected internet. how implement "exponential back-off algorithm" snackbar "retry" action check internet connectivity?

here doing now..

i using asynctask check internet connectivity. if there no connectivity, showing snackbar retry action. when user clicks on retry, increment back-off value(will set value twice previous value - temporarily), dismissing old snackbar , showing new snackbar. when timer runs out, check connectivity again, , if still not there, re-show snackbar back-off value increased.

what best way of implementing snackbar in situation? there simple solution situation, other approach?


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -