1

How to call an Object's method that is defined in a different function? [Android]

view story
linux-howto

http://stackoverflow.com – I have this function called startTimer and I created an instance of the CountDownTimer class: public void startTimer(View view){ CountDownTimer myTime = new CountDownTimer(30000,1000) { } } The CountDownTimer has a method called cancel() that I want to invoke from a different method, resetTimer(): public void resetTimer() { } Both functions are contained within a single class. How do I call the cancel() method of CountDownTimer from the resetTimer()? (HowTos)