如何使用按钮OnClick将语音SMS发送到另一个联系电话,我也想在此处自动计划,就像用户一旦用户单击按钮,然后语音呼叫需要每1分钟后重复发送一次。。
请帮助我提供一些指导和教程。
您应该查看以下链接
http://code.google.com/p/google-voice-java/w/list
[编辑1]
进行重复任务:
new Timer().scheduleAtFixedRate(task, after, interval);
任务是要执行的方法
在初始执行的时间之后
(间隔重复执行的时间)
[编辑2]
package com.tutorialspoint;
import java.util.*;
public class TimerDemo {
public static void main(String[] args) {
// creating timer task, timer
TimerTask tasknew = new TimerScheduleFixedRate();
Timer timer = new Timer();
// scheduling the task at fixed rate
timer.scheduleAtFixedRate(tasknew,new Date(),1000);
}
// this method performs the task
public void run() {
System.out.println("working at fixed rate");
}
}
让我们编译并运行上述程序,这将产生以下结果。
以固定速度工作
以固定速度工作
以固定速度工作
以固定速率工作等...