Short version:
On Chromebooks, when my app shows a toast message every 60 seconds (checking for data updates), the toast gets shown even when my app isn't the current app. Is there a way to have my app's toasts only appear when the app is active?
Longer version:
My app checks a server for updates every 60 seconds while the app is active (foreground) and shows the result as a toast. That's OK on Android, where only one app is active at a time.
However, some of my users run my app on Chromebooks too, and apparently they're seeing that periodic toast even when my app is open but not active. And they find that distracting.
I'm wondering if there's a smarter way to handle this. I would like to continue supporting Chromebook use.
(I may redesign the frequency and logic of these toasts, but really for now I'm looking for a way to suppress toasts when my app is not active.)
Any help appreciated!
On Chromebooks, when my app shows a toast message every 60 seconds (checking for data updates), the toast gets shown even when my app isn't the current app. Is there a way to have my app's toasts only appear when the app is active?
Longer version:
My app checks a server for updates every 60 seconds while the app is active (foreground) and shows the result as a toast. That's OK on Android, where only one app is active at a time.
However, some of my users run my app on Chromebooks too, and apparently they're seeing that periodic toast even when my app is open but not active. And they find that distracting.
I'm wondering if there's a smarter way to handle this. I would like to continue supporting Chromebook use.
(I may redesign the frequency and logic of these toasts, but really for now I'm looking for a way to suppress toasts when my app is not active.)
Any help appreciated!