Android display Toast even the app is closed

Say, I have to calculate the sum of two digits and I pass the two values to the server and sever returns the calculated value and the app displays it in a Toast. It works perfectly. But I want to show this Toast even though the app is closed. I am wondering if I could use any other Context to make a global Toast. or what is the best way? Do creating a Notification makes any sense?


Showing toasts when your application isn't in the foreground even if possible is not the best idea. This is because a Toast poppoing out of nowhere can be annoying, uninformative and disrupt whatever the user is currently doing.

As you mentioned, Notifications are the way to go on this one. A notification can be read by the user whenever he decides to do it and they can't be missed as opposed to Toast simple because checking the notification requires the user to take action.

You can read more on notifications and how to implement them HERE.

Need Your Help

SQL Server 2005, Replicating between timezones

sql sql-server datetime replication database-replication

How does SQL Server handle the transfer of the datetime columns when replicating between timezones?

Organize elements into columns dynamically

javascript jquery

I need to organize an unknown amount of elements into columns which read vertically. The code below works great for organizing the elements based on a set amount per column, but I won't know the am...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.