I have a main class;
ClientPlayer extends Activity {
and a service
LotteryServer extends Service implements Runnable {
There is a very simple solution to the above problem
just make a static reference of your Activity before your onCreat()
method
MainActivity mn;
then initialize it in you onCreat()
method like this
mn=MainActivity.this;
and after that you just have to use it to call your runOnUiThread
mn.runOnUiThread(new Runnable() {
public void run() {
tv.setText(fns);///do what
}
});
hope it work.