Yes, all of the components of your app share data in the same place of the filesystem, regardless of the process they run in, so any changes you make there will be seen by all of them. Of course you have to be careful if you have multiple processes modifying the same file that they don't step on each other. SQLite takes cares of this for you.
See, however, my previous e-mail; from your description this doesn't sound like a case where having a service in a separate process is necessarily a good idea. And yes, using bindService() (with the appropriate flag passed in) will have the service running as long as that client is bound to it. On Mon, Jan 12, 2009 at 12:49 PM, Sarath Kamisetty < sarath.kamise...@gmail.com> wrote: > > Hi, > > I am a little bit confused about what can/cannot a service access when > it is running as an independent process (remote service). I have a > database created by my activity when it is run the 1st time. Later on > this activity adds entries to this database. I don't want my service > running all the time, instead the service uses AlarmManager to > schedule itself to run (sometimes it doesn't know when to run, so has > to suspend itself forever until notified by the activity). For > activity to service communication aidl will be used, but I was > wondering if the service, if run as independent process, can access > the database created and updated by the activity ? Can an application > have multiple processes ? If so, I guess as long as the service and > activity belong to same application I think the answer is yes, but can > someone please confirm ? or is there a need in this case to have > activity and service in completely different applicaitons accessing > shared database (don't know if this is possible) ? > > The other help I am looking for is, in this case how should my > activity be invoking the service ? If I use bindService() will that > make service run when the activity is running (something I don't > need/want to happen) ? or do I need to use some intent and let the > system notify my service ? Can anyone suggest how to design this ? > > Thanks, > Sarath > > > > -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---