Hi guys, I have spend over an hour trying to make this work now. I must be missing something obvious, but no amount of searching is working.
I am trying to schedule a task to run every few minutes, and i am trying to do it using scheduleAtFixedRate(). I am testing this in a very basic hello world app to isolate it from the rest of my project. I have a very simple app with one Activity and in its onCreate() method i have the following code: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); final Runnable task = new Runnable() { public void run() { Toast.makeText(getApplicationContext(), "RUN!", Toast.LENGTH_SHORT).show(); } }; final ScheduledExecutorService locationUdateScheduler = Executors.newScheduledThreadPool(1); locationUdateScheduler.scheduleAtFixedRate( task, 1, 10, TimeUnit.SECONDS); } For some reason i can not work out, when i run this I never see the toast message. Any help debugging this would be much appreciated. p.s. i have a vague hunch it might be because i have not added something to the manifest file, but searching around the internet reveals nothing of relevance. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---