http://skillgun.com/question/608/android/threads/how-to-create-a-service-with-single-thread-should-i-use-intentservice-or-asynctask
A small code snipphet to demonstrate how to create a service using threads.
A thread is created first using the Thread Class, the object of which is then used to initiate and create the service.
Start method is used to create and execute the thread, hence invoking the service
public static Thread demo(final Runnable runnable) { final Thread t = new Thread() { @Override public void run() { try { runnable.run(); } finally { } } }; t.start(); return t;}
public static Thread demo(final Runnable runnable) {
final Thread t = new Thread() {
@Override
public void run() {
try {
runnable.run();
} finally {
}
};
t.start();
return t;