I am developing an Android application using GreenDroid. The application is intended only for testing atm, so all it contains is an ActionBar with an update button, three tabs and activity for each of these tabs.
Everything that I am trying to achieve at the moment shows a toast message when the update button is pressed on the ActionBar, but I want the toast message to be called from one of my actions, we will call it Listener1Activity which is the activity that is on the first tab. .. this is because Listener1Activity will eventually contain the list that I want to reload when the ActionBar button is pressed, if I can make it work with a simple toast, until I can figure it out later.
I was looking for intent, broadcast, but nothing of the sort fit.
I don’t want the activity to start every time a button is pressed, I just want a call to be made in it and a toast.
In principle, this is similar to performing two actions simultaneously and pressing one button when calling a method in another. Is not it? Or I'm wrong?
SenderActivity and Listener1Activity.
In iOS, I just send NSNotification from SenderActivity and add an observer to Listener1Activity. What would be the best way to achieve this in Android?
Thank!
Stephen
source
share