This code is supposed to use a service to show a toast message. There are no errors, but it doesn\'t show the toast.
main activity
public class Main
See this part of the docs
(An IntentService has a few limitations:
It can't interact directly with your user interface. To put its results in the UI, you have to send them to an Activity.
You need to put it on the main Thread. See the answer here by rony of a way to do that.
and from the full documentation on IntentService
handles each Intent in turn using a worker thread