在这种情况下,我对添加计时器感到困惑。单击“button_Timer”时,我想每分钟发送一次“mService.sendAlert(mDevice, str2)”。
public void onClick(View v) {
switch (v.getId()) {
case R.id.button_Timer:
Log.e("MainActivity", "Clicked");
if (mService != null)
{
str2 = Ef.getText().toString();
str2 = str2.substring(0, 0) + "E" + str2.substring(0, str2.length());
mService.sendAlert(mDevice, str2);
}
break;
default:
Log.e(TAG,"wrong Click event");
break;
}
}
提前致谢