I\'m making an app that updates the UI through the runOnUiThread(Runnable) method. It is very important that this UI thread continues to run as long as the user has this app
I would rather run your code as a Service, and hook it to the Activity having the UI through bindService.
The other option you have, is to create a WakeLock and maintain the phone on all the time. It may be very hard to the battery, though.
Check the dev guide entry for bound services and see if it fits your design: http://developer.android.com/guide/topics/fundamentals/bound-services.html
There are many very good tutorials out there for running services, with varying degrees of complexity. Take a look at some of them here: