The timer should work non stop once i start my program with one second interval. At the top of my MainActivity i added:
import java.util.Timer;
Then in the MainActivity class:
public class MainActivity extends ActionBarActivity
I added:
private Timer timer = new Timer();
Now i have the onCreate method:
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
addListenerOnButton();
currentActivity = this;
initTTS();
}
How can i make that the timer will start working once i'm starting my program with interval of a second ?