That is very platform-dependent. There are various possibilities, depending on the platform and just what it is you need to do in background.
iOS is quite restricted in this regard, for example, but they provide alternatives that will still give you what you need in most cases without your app actually having to run in background. Generally, if Apple can identify a common need for some sort of background processing, they would prefer that the OS do it and "wake up" apps as needed by some OS service. (GeoLocation and Alerts are good examples.)
You are not likely to find a single solution that is going to work on every platform. The industry just isn't there yet. At best, you will be able to do specific things on specific platforms, so you are going to have to be more specific in setting-out just what you are trying to accomplish.
There are very few cases today with modern smartphones where you can literally just run your app in background as a service. This is what Microsoft eventually realized was the biggest problem with the Windows Mobile platform. They were too permissive, and users installed too many apps that provided background services and implemented them poorly, leading to a poor user experience.
Thank you for your prompt response.
The project that I'm developing is as follows:
I am developing an application for the Motorola ET1 tablet. This application should run as a process over the phone and without the user of the tablet note that the application is running.
The application that I'm doing is to take data from the GPS tablet and send these data to a server through a post every two minutes. If the tablet has no internet connection this application should save the data in a database. I am developing this application for the company that I work, for that reason I have enough urgency to see if is possible to do this with Rhomobile and how to do it. Also if is possible some example of how to do that would be fantastic, or any reference or link with which I can guide.
Again thank you very much for your quick response and I am aware of your comments.