你设置alarm参数是多少次了,看来你的要求不长久,可以使用timertask更方便吧

解决方案 »

  1.   


    目前我只知道 开始 和结束的时间,也可能 要运行很久的。 alarm 好像没有 执行多少次 这个参数吧
      

  2.   

    public void setRepeating (int type, long triggerAtTime, long interval, PendingIntent operation) Parameters
    type  One of ELAPSED_REALTIME, ELAPSED_REALTIME_WAKEUP}, RTC or RTC_WAKEUP. 
    triggerAtTime  Time the alarm should first go off, using the appropriate clock (depending on the alarm type). 
    interval  Interval between subsequent repeats of the alarm. 
    operation  Action to perform when the alarm goes off; typically comes from IntentSender.getBroadcast(). 貌似没有说 什么时候结束吧  。、