I'm new to Android development and I need some help with a little problem.
I have a background Service that runs my media player and communicate with my PlayerActivity.
So far so good.

I need to schedule the execution of the tracks in different periods. i.e Play track x for one minute than play track y for 30 seconds etc.

So I call MyTimer thread form the PlayerActivity, this thread throws event at the specific time,  

the PlayerActivity catches the Event and calls the MediaplayerService next() method.
My Problem is if I call next() without the thread it works fine, If i call it with the thread I get 

```
 mContext is null, can't getMirrorDisplayStatus!!!

```

with mediaplayer warning (1, 902)
I've tried to run this thread with from the PlayerActivity via Handler.post() and runOnUiThread()
and I get the same error.

below is the code for MyTimer Thread.

```
public class MyTimer implements Runnable {

private Object mPauseLock;
private boolean mPaused;
private boolean mFinished;
private TimeSection section;

public Trainer()
{
    mPauseLock = new Object();
    mPaused = false;
    mFinished = false;
    BusProvider.getInstance().register(this);
}

@Override
public void run()
{
    while (!mFinished)
    {
        TimerManager tm = TimerManager.getInstace();
        this.section = tm.getCurrentTimeSection();
        if(this.section == null)
            mFinished = true;
        else
        {
            tm.inc();
            // produce sectionChangeEvent event
            BusProvider.getInstance().post(produceSectionEvent());
            try
            {
                Thread.sleep((this.section.getTypeDuration() * 1000));
            } catch (InterruptedException e)
            {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }
        synchronized (mPauseLock)
        {
            while (mPaused)
            {
                try
                {
                    mPauseLock.wait();
                } catch (InterruptedException e)
                {
                }
            }
        }
    }

}

  /**
 * Call this on pause.
 */
public void onPause() {
    synchronized (mPauseLock) {
        mPaused = true;
    }
}

/**
 * Call this on resume.
 */
public void onResume() {
    synchronized (mPauseLock) {
        mPaused = false;
        mPauseLock.notifyAll();
    }
}

@Produce public TimeSectionEvent produceSectionEvent(){
    return new TimeSectionEvent(this.section);
}

}

```

some code of the Player Activity:

```
public class PlayerActivity implements
    IMediaPlayerServiceClient{

private MediaPlayerService mService;

....

/**
 * Binds to the instance of MediaPlayerService. If no instance of
 * MediaPlayerService exists, it first starts a new instance of the service.
 */
public void bindToService()
{
    Intent intent = new Intent(this, MediaPlayerService.class);

    if (MediaPlayerServiceRunning())
    {
        // Bind to LocalService
        bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
    } else
    {
        startService(intent);
        bindService(intent, mConnection, Context.BIND_AUTO_CREATE);

    }

}

.....

/*
* This is how I start the timing thread
*/
private void startTiming()
{
    mTimer = new MyTimer();
    runOnUiThread(mTimer);
//  trainingHandler.post(mTrainer);
}

public void next(TimeSection section)
{
    mService.next(section);
}

/*
* Here I catch the TimeSectionEvent from MyTimer thread
*/
@Subscribe public void onSectionChanged(TimeSectionEvent e)
{
    TimeSection section = e.getSection();
    if(section != null)
         next(section);
}

```