How to create an Android app to give a beep sound before approaching the 1 min mark (Say at 45 sec, just a beep to let the user knowing, 15 sec before it passes a min)?
Asked
Active
Viewed 76 times
-2
-
1What does the beep have to do with the SQLLite table? Is this an app for Android? – Walls Feb 28 '13 at 18:51
-
What have you programmed so far? Unless you can provide a SSCCE, we can't help you. http://sscce.org/ – james.garriss Feb 28 '13 at 18:53
1 Answers
2
You can use the native MediaPlayer for this purpose.
new CountDownTimer(//put time required here) {
@Override
public void onFinish() {
timeUp();
}
@Override
public void onTick(long millisUntilFinished) {
//get time remaining here
}
}.start();
Create an Uri using Uri soundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
and then a ringtone - and call play().

sarnabtech
- 486
- 3
- 12