As far as we know, this is not possible yet. There is no API for it and, I believe, when your app's UI closes, all child processes created would also be terminated. (I haven't tested that yet myself, nor heard from anyone who has.)
The only current way to do anything resembling this is with the Android player, because apps continue to run even when the player's UI closes. This isn't a particularly useful solution, however, since you have no guarantees how long the app is allowed to run and if system memory runs low I believe it's still terminated, without notice.
There's also no way to have an app launched at startup, or similar things that might be a short-term workaround for the lack of a background "service" API.