December 2013
Beginner
416 pages
12h 45m
English
In the application you want to check the time passed to notify the user at regular intervals just as you did with the vibrate function. Here’s how.
1. Open the TimerActivity.java file in the Activity package. In the run method of the UpdateTimer class, modify the code:
if (timer.isRunning() && settings.isVibrateOn(activity)) { vibrateCheck();}
Replace it with the code shown in Listing 5.25.
Listing 5.25 The Modified if Statement
if (timer.isRunning()) { if (settings.isVibrateOn(activity)) { vibrateCheck(); } notifyCheck();}
Run Quick fix to add the missing notifyCheck method.
2. Open the strings.xml resource file, and add ...
Read now
Unlock full access