Ignore the previous post...I made a mistake by creating a new class that extends Thread overriding the run function. And now it works. Problem solved... Thanks for the help.