----- Original Message ----- From: "Mark Murphy" <[email protected]>
To: <[email protected]>
Sent: Wednesday, June 08, 2011 11:24 PM
Subject: Re: [android-developers] two questions from a newbie


On Wed, Jun 8, 2011 at 6:14 PM, Knutsford Software
<[email protected]> wrote:
1) If you have a form in in app what do you do if the app goes into the
background while you are in the middle of completing the form? Do you need to do something in OnResume or will it resume in the state that you left it
in before it went into the background?

At minimum, when onSaveInstanceState() is called, stuff the form
contents into the Bundle, at least for widgets where that is not
handled automatically.

You may also consider whether you should persist the form contents to
a temporary file or something, in case your activity is destroyed
before the user comes back to it.

2) If you have something like



Intent i =

new
Intent(Intent.ACTION_VIEW);

i.setData(Uri.parse(uri));

startActivity(i);



in OnCreate what do you do about OnResume so that the browser is pointing to
where it was when it was left or do you have to start it again

I'm sorry, but I don't follow this part at all. If you call
startActivity() on a URL, the default browser will display that URL.
Period.






Sorry - what do you mean by stuff the form contents into the Bundle






For part two I meant if you have been browsng and then it loses focus then you resume it you I presume can't pick up the url you had browsed to - you have to start from scratch?


Thanks






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