Top "Runnable" questions

The Runnable interface defines a single method, run, meant to contain the code executed in the thread.

removeCallbacks not stopping runnable

I am calling from a method: myHandler.postDelayed(mMyRunnableHide, 6000); which calls: public Runnable mMyRunnableHide = new Runnable() { public void run() { mTextDisplay.…

android runnable
Difference between AsyncTask and Thread/Runnable

I have question which puzzles me. Imagine I wanna do something in another thread, like fetching GPS/Location stuff, which …

android multithreading android-asynctask runnable android-threading
Starting a runnable in background thread

I have, to my knowledge, implemented a runnable which is created on a new thread. However, the thread does not …

android multithreading runnable
how can I pass a variable into a new Runnable declaration?

I have the following : Runnable done = new Runnable() { public void run() { System.out.println("Hello"); } }; And then in my Android …

java android runnable android-2.1-eclair
How to execute a function every two seconds in Java on Android?

I'm trying to execute a chunk of Java code in my Android program every two seconds. My code currently looks …

java android multithreading runnable postdelayed
Context inside a Runnable

I try to play a sound from R.raw. inside a Thread/Runnable But I can't get this to work. …

android multithreading media-player runnable android-context
How to start/stop Runnable/Handler?

I'm trying to maintain databases synchronized between a Webservice and Android app. The code below is working, but I encounter …

android handler runnable
Android: "Auto refresh" after a certain time

i have search how i can do an "Auto refresh" or a runnable method for my program, i saw some …

java android multithreading runnable
Is there already a StopWatch class for android and why doesn't my implementation work?

Lately I saw http://developer.android.com/reference/android/os/CountDownTimer.html and wondered if there is an respective class …

java android timer runnable stopwatch
Lambda that does absolutely nothing

I needed to have a lambda expression of the functional interface Runnable that did nothing. I used to have a …

java lambda java-8 runnable