Try that.  If I send it again, in case case I will get error from
server " the user already exists." The request has sent to server.
Problem is that it could not update UI since it is already destroyed.

On Jan 23, 10:50 am, "James Patillo" <ja...@patillo.org> wrote:
> Well, you can probably save the state of the thread when the activity is
> destroyed then open a new thread when the activity is resumed/recreated and
> restore the previous thread's state to the new one.
>
> -----Original Message-----
> From: cindy [mailto:ypu01...@yahoo.com]
> Sent: Friday, January 23, 2009 12:45 PM
> To: Android Developers
> Subject: [android-developers] Re: Activity Issue on G1 phone
>
> should this be considered  as a bug for android application. Usally,
> when people use keyboard, they are sending some information to server.
> After that UI will be updated in call back.
>
> On Jan 23, 10:20 am, "James Patillo" <ja...@patillo.org> wrote:
> > Yeah, threads are particularly fun to deal with in Android.
>
> > -----Original Message-----
> > From: Stanley.lei [mailto:xiaofeng.lei...@gmail.com]
> > Sent: Friday, January 23, 2009 11:52 AM
> > To: Android Developers
> > Subject: [android-developers] Re: Activity Issue on G1 phone
>
> > I rather agree with you!
>
> > In fact, I could not understand why Google designs like this. The
> > keyboard action could impact the rotation, but why changing rotation
> > impacts the activity? In my case, the thread is destroyed, which will
> > destroy all tasks in the thread. In worst case, the user will have to
> > re-create their data from scratch.
>
> > stanley
>
> > On Jan 24, 1:47 am, cindy <ypu01...@yahoo.com> wrote:
> > > Then android's implementation has problem.
>
> > > For example, if my application needs to create account, of cause, the
> > > key board will open first. After user typed in user name and password,
> > > then he clickes the "create" button.Request   sends to server in a
> > > thread. After that, he closes the keyboard, the activity will be
> > > destroyed. So the callback function in thread to update UI will
> > > crashed.
>
> > > It happens exactly in my application.
>
> > > On Jan 23, 7:20 am, "James Patillo" <ja...@patillo.org> wrote:
>
> > > > I think what happens is that the activity's state is saved, the
> activity
> > is
> > > > destroyed, and then it is recreated with its saved state. This is the
> > same
> > > > thing that happens when the home button is pressed and the app is
> > reopened.
>
> > > > This just what I have come to understand, and may be wrong.
>
> > > > -----Original Message-----
> > > > From: Stanley.lei [mailto:xiaofeng.lei...@gmail.com]
> > > > Sent: Friday, January 23, 2009 9:04 AM
> > > > To: Android Developers
>
> > > > Cc: jinnan....@gmail.com
> > > > Subject: [android-developers] Activity Issue on G1 phone
>
> > > > Hi all,
>
> > > > I met a very strange issue when I tested my application on G1 phone.
>
> > > > As usual method, I started a thread in an activity, and stopped the
> > > > thread in the onDestroy method. But to my surprise, when I tried to
> > > > slide down the keypad, the onDestroy method was called and the thread
> > > > was stopped, and more surprising thing was that the activity was still
> > > > alive and visible.
>
> > > > From the activity's life cycle
>
> diagram,http://code.google.com/android/reference/android/app/Activity.html,
> > we
> > > > can see that onDestroy is called only before the activity is shut
> > > > down. But my activity is still active and visible!!!
>
> > > > Who could tell me what the hidden story is?
>
> > > > Any reply will be appreciated.
>
> > > > Thanks,
>
> > > > Stanley
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to