Thanks, Dianne.  I don't have onConfigurationChanged() implemented in
the activity or service, and so far as I know it was only the service
that was running, and it has no UI of course.  The log says that the
onCreate() method on the launchable (but never launched) activity
called setContentView().  This failed to find R.layout.main, which I
confirmed by checking the resource id in the R.java file.  There is
currently no layout-land folder.

I will eventually add the landscape layouts so this isn't a killer
issue.  It's that the structure of an app with multiple activities and
services is still a bit obscure to me.  So I am left wondering how
that onCreate() got called.  In the manifest the UI activity has the
basic stuff like .LAUNCHER specified, and nothing more.  Until this
happened it had always behaved properly.  I would post the manifest
but it's on a computer I can't get to right now.

On Feb 17, 12:02 am, Dianne Hackborn <[email protected]> wrote:
> Well if something in a process crashes, yes the entire process goes down.
>
> As for the rotation, I don't have a clear enough picture of your app to
> answer.  All I can say is that when you rotate the screen, any running
> services get onConfigurationChanged() and activities by default get
> destroyed and re-created when they need to run in a new configuration.
>
>
>
> On Mon, Feb 16, 2009 at 8:29 PM, Nmix <[email protected]> wrote:
>
> > When I rotated the screen on the emulator (^F11) to test an app's
> > layout I got a surprise.  A different app I am working on crashed.
> > This other app had never been launched since booting the emulator but
> > it does have a service that starts on boot_completed, and which was
> > sitting there quietly in the background doing nothing.
>
> > The reason for the crash, from the log, is that it couldn't find the
> > layout resource for one of the app's launchable activities that does
> > have a UI.  That isn't surprising since I haven't yet provided a
> > landscape layout for for that UI activity.  But I had not launched
> > it.  Then when I went looking for the service component, I found that
> > it had quit as well.
>
> > Is this normal behavior?  Why did the onCreate of the UI activity get
> > called when it had never been launched?  And, does this sort of crash
> > always take out everything running in the same process, including
> > services?
>
> > Thanks!
>
> --
> Dianne Hackborn
> Android framework engineer
> [email protected]
>
> 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 [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