If you don't specify in the manifest that the components should have
different process names, they'll be in the same process.

You can even put components from different .apk's into the same
process by giving them the same process name -- so long as they're
signed by the same cert. Or maybe the same key; I forget which way
they set it up. Generally the same thing either way.

A component dying (say, a GUI) will not take out other components
(e.g. a service). It's not like C++ where a small bug in one component
will corrupt memory.  That's not to say that bugs in one can't affect
another, but not nearly to the same degree.

On Mar 30, 9:22 pm, Kevin Duffey <[email protected]> wrote:
> Hey Mark, what about if you want a UI component to the service.. say for
> configuration and such, but otherwise don't want the UI normally running,
> just the background service? IF you only launch the service, but also offer
> an icon to launch a GUI, will they still share the same process? Not even
> sure if/how you can do that, but just curious if you can, what happens.
>
> On Tue, Mar 30, 2010 at 6:12 PM, Mark Murphy <[email protected]>wrote:
>
>
>
> > zhiqiang wang wrote:
> > > I know they can stay in one APK,but will they run in different
> > > process? that is,is the UI dead,will the service dead too?
>
> > By default they will run in the same process. You want them to run in
> > the same process. Using more than one process takes up more RAM.
>
> > --
> > Mark Murphy (a Commons Guy)
> >http://commonsware.com|http://twitter.com/commonsguy
>
> > _Android Programming Tutorials_ Version 2.0 Available!
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]<android-developers%2Bunsubs 
> > [email protected]>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> > To unsubscribe, reply using "remove me" as the subject.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to