private LocationPollingTimerTask task; private static final int INTERVAL = 60000; public void onCreate(){ timer = new Timer(); task = new LocationPollingTimerTask(); } @Override public int onStartCommand(Intent intent, int flags, int startId) { timer.scheduleAtFixedRate(task , INTERVAL, INTERVAL); return Service.MODE_PRIVATE; } @Override public void onDestroy() { timer.cancel(); }