Android Question GPS recording in background


Licensed User

I am starting a new project and I would like to seek for some conceptual advise before I start. I would like my app (once started) to automatically record my GPS position at a given frequency in the background and store the data in a file or database.

Is this a typical example to use a Service or is there another and better approach? I do not want any other app to kill my app and regardless what else happens, e.g. a phone call or using the internet, using the calculator, etc to stop recording and filing my GPS position.

Any advice is highly appeciated.
Thanks a lot in advance.
Kind regards