I have a separate thread running in C++ in the background and I want it to be able to post code to be run on another thread that\'s already running an android.os.Looper (e.g
You need a function already executed in the main thread. If you call ALooper_forThread() or ALooper_prepare() there, you will get a pointer to looper associated with main thread. Remember to call ALooper_acquire() so it can be shared among different threads.