I followed a tutorial online on how to receive push notifications on Android. Got everything set up on our server and was able to receive a message and log it.
The class that receives the message is called MessageReceiver and extends BroadcastReceiver. In this class's OnReceive() message I managed to Log.v the message payload correctly.
Now this OnReceive() is not able to do any UI stuff, like for example if I wanted to pop up a window telling the user that a push has come in, I couldn't. I can't even create a Notification from here to put in the phone's toolbar.
What should I do? I don't want to change my message receving code too much as it seems to be working ok. Any ideas on how I can get this method to interact with the UI or call other methods from other .java files? I know I could always create static methods and call them from here, but a lot of the methods I want to call would not work as static as they interact with many other pieces of code.
Thanks.