Dmitry Smolyaninov Dmitry Smolyaninov - 11 months ago 57
Android Question

Android views that can be popped up wherever from application

I have an app that recieves push messages from Google Cloud Messaging.

So when the app is not visible user recieves Notification. If app is visible user recieves Toast. But want to try more interesting solutions if they are exist.

So the question is what views in Android could be called from any Activity of the app like this happens when we use Toast?

Thanks in advance for your answers!

Answer Source

Ok, there is no legal way to do what I wanted. It's possible to invoke AlertDialog, but it will block the current activity. To not block the activity, we can still use Toasts, even custom, but without possibility to make it stay on the screen.

But the best solution is to do nothing, but leave notifications only, doesnt metter if app is visible or not.