I was wondering what the relationship is between an Android service and the activity that started it (which is happening in this case, via the StartService() method) ?
Is the service just another thread running within the same process the activity belongs, or does it get its own ?
The reason I ask is b/c I’m using a SQLite DB that is going to be accessed from both an activity and the service that it kicks off, and so need to determine the proper way to syncronize DB access between them (leverage the built-in multi-threading support of SQLite, or implement some homegrown interprocess snycronization methodology).
note: I’m not asking how to syncronize access, I’m trying to figure out weather I’m accessing the DB from two seperate processes or seperate threads, which will dictate how I go about this.
note: I’m writing in .net/mono using Mono.Data.Sqlite, not in raw Android/Java.
Any insight is welcome and appreciated, Thanks.
Does the android developer site not contain your answer? It goes into great detail of the
ServiceandActivity.