I forgot to write that this only happens when the screen is rotated
many times. It doesn't happen if I just switch from portrait to
landscape mode one or two times.

On 2 Dec, 10:11, Eyvind Almqvist <[email protected]> wrote:
> Thanks Yahel! I removed the  call to setRunning(false) from onPause()
> and this fixed thepowerkeyand USB cable problems. SonyEricsson
> tested theapp, but there was one remaining problem.
>
> When they rotate the screen several times, the screen turns black and
> sometimes the message “Sorry! Activity XXX(in application XXX) is not
> responding” pops up. I can not reproduce this onmySamsung galaxy S,
> but they say that it occurs on  SonyEricsson X10, X10 Mini, X10 Mini
> Pro, X8. They say that it reproduced easier on Android 1.6 than 2.1.
> Do you have any idea how I can fix this rotation problem?
>
> On 30 Nov, 20:25, Eyvind Almqvist <[email protected]> wrote:
>
>
>
> > The only object I create in onCreate() is the view. I do this with
>
> >  mView = (MView) findViewById(R.id.mid);
>
> > I found one thing with the drawing loop and the setRunning() method
> > that maybe causes the  problem. I can't test onmySamsung device,
> > since I can't reproduce the problem there, but I will send a new
> > version of theappto SonyEricsson tomorrow so they can test it. Hope
> > it works out this time....
>
> > On 30 Nov, 18:33, Yahel <[email protected]> wrote:
>
> > > Ok that's weird.
> > > If you have nothing in your onStart and your onResume sets the loop as
> > > running for your drawing loop, then that is where you should have a
> > > look.
>
> > > Myguess would be that the restarting of your looping via setRunning
> > > doesn't do what you think and that it is just not restarting at all so
> > > that you don't have any drawing going on.
>
> > > Or maybe you are creating objects in your onCreate method that get
> > > destroyed when your apps looses focus and that are never recreated
> > > again because onCreate is only called the very first time you launch
> > > your activity.
>
> > > First thing would be to Log.e("drawing","I'm drawing") in your thread
> > > drawing loop.
>
> > > Yahel
>
> > > On Nov 30, 10:50 am, Eyvind Almqvist <[email protected]>
> > > wrote:
>
> > > > After I  insert the USB cable, there is three options “1. Connect your
> > > > phone. 2. Install PC Companion. 3. Charge phone.” No matter which
> > > > option I have selected, theappwill just freeze without any message.
>
> > > > When I press thepowerkeyto go topowersave mode and then press it
> > > > again to resume the application, theappwill just freeze without any
> > > > message.
>
> > > > I test by doing lots of screen orientation changes, like you
> > > > recommended.But I can not replicate the freezing problem onmySamsung
> > > > galaxy. I don't have the SonyEricsson X10 and X8 devices to test on. I
> > > > try to simulate apowerkeypress on the emulator, by pressing the
> > > >powerbutton. I debug and onKeyDown is called, but onpause() and
> > > > onResume() is not called.
> > > > Doesn't onpause() and onResume() get called when thepowerkeyis
> > > >pressed? I can not simulate insertion of a USB cable on the emulator.
>
> > > >MyonStart method only call the superclass, so I don't see how an
> > > > exception could be raised here.MyonResume method also sets the
> > > > graphics thread to setRunning(false), which means that the thread will
> > > > continue, but it will not
> > > > execute the drawing loop.
>
> > > > On 29 Nov, 19:16, Dianne Hackborn <[email protected]> wrote:
>
> > > > > What do you mean your "appfreezes"?  This is not a typical failure 
> > > > > case
> > > > > when pressing thepowerbutton. :}
>
> > > > > On Mon, Nov 29, 2010 at 10:05 AM, Eyvind Almqvist 
> > > > > <[email protected]
>
> > > > > > wrote:
> > > > > >Myappfreezeswhen thepowerkeyispressed. This happens on
> > > > > > SonyEricsson X10 and X8, but not on Samsung Galaxy S. This is what
> > > > > > happens:
>
> > > > > > 1)Launch the application->Presspowerkey-> Presspowerkeyagain to
> > > > > > activeapp->Appfreeze.
>
> > > > > > Theappalsofreezeswhen the USB cable is inserted, like this:
>
> > > > > > 2)Launch the application-> Insert USB cable->Message pops up and 
> > > > > > click
> > > > > > any option to continue->Appfreeze.
>
> > > > > > I am distributing apps to SonyEricsson's Playnow appstore. They have
> > > > > > reported this as error, so I have to fix this. Does anyone have an
> > > > > > idea how to fix this? I have already followed all the advices in
> > > > > > "Designing for Responsiveness" on
>
> > > > > >http://developer.android.com/guide/practices/design/responsiveness.html
>
> > > > > > --
> > > > > > 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
>
> > > > > --
> > > > > 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, and so won't reply to such e-mails.  All such
> > > > > questions should be posted on public forums, where I and others can 
> > > > > see and
> > > > > answer them.- Dölj citerad text -
>
> > > > > - Visa citerad text -- Dölj citerad text -
>
> > > - Visa citerad text -- Dölj citerad text -
>
> > - Visa citerad text -- Dölj citerad text -
>
> - Visa citerad text -

-- 
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