Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - postDelayed problem

postDelayed problem

Put your problem here if it does not fit any of the other categories.

postDelayed problem

Postby mattb » Mon Jan 25, 2010 7:49 pm

Hi all,

I'm trying to setup a service that runs some code once when the service starts and then again every 8 hours. My code is pretty simple (relevant parts displayed below):

Code: Select all
   private long PUBLISH_UPDATE_DELAY = 8 * 60 * 60 * 1000;  // 8 hours

   public void onStart(Intent intent, int startId) {
      Log.i("TEST", "BootUpService START");
      super.onStart(intent, startId);
      publishTask.run();
   }

   private Runnable publishTask = new Runnable() {
      @Override
      public void run() {
         
         Log.i("TEST", "Sending data to server...");
         
         // CODE SNIPPED

         Log.i("TEST", "Sending data to server COMPLETE");
         handler.postDelayed(publishTask, PUBLISH_UPDATE_DELAY);
      }
   };



This works to a point, but bizarrely appears to be running the publishTask every 30 minutes, not 8 hours.

Is anyone aware of an undocumented 30 minute maximum for postDelayed, or am I missing something really obvious?

Thanks!
mattb
Freshman
Freshman
 
Posts: 4
Joined: Fri Nov 27, 2009 3:17 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 19 guests