Android may kill
Activities that are not in use. But
Activities are supposed to interact with the user, and they can't do that anyway if they're in the background. But there are also
Services, which run only in the background, and sound exactly like what you're looking for. See
http://developer.android.com/guide/topics/fundamentals.html for descriptions of the basic building blocks for Android apps.
And yes, a user -or a process manager he configures accordingly- can kill any process, but presumably a user would
want your background service to run; so I don't see that as a problem.