So I have created a global class which extends globalsettings:
public class Global extends GlobalSettings {
private Thread thread = new Thread();
@Override
public void onStart(Application app) {
....
public void write(byte[] bytes) {
....
Which has a Thread in it as I am listening to a socket, so I need it up and running all the time. I tried to use Actors and had a class that extends UntypedActor but it seemed to be very hackish and I had to at the end of the call to the actor make it call itself.
I also need to write to the socket. which I have a method called write which writes to the socket. What I would like to do is from one of my methods call the global objects write method. Is there a way I can do this? Atm my Global object is not in a package. Do I need to put it into a package to get it to work?