package fishrungames.kobserver;

import java.util.TimerTask;

import fishrungames.kobserver.JniWrapper;

class GetMessageTimerTask extends TimerTask
{
	
	@Override
	public void run()
	{
		
		String messageHeader = JniWrapper.GetLastMessageHeader();
		String messageText = JniWrapper.GetLastMessageText();
		
		if (!messageHeader.equals("") && !messageText.equals(""))
		{
			JniWrapper.messages_headers.add(0, messageHeader);
			JniWrapper.messages_texts.add(0, messageText);
			
			if (JniWrapper.messagesActivity != null)
			{
				JniWrapper.messagesActivity.RefreshMessageList();
			}
		
		}

	}
}
