It works this way on 1.5 and every other version of the platform. One could argue there shouldn't be a setIntent() method, but there you go. Anyway this won't change because (1) it would break existing applications, and (2) it is not worth the trouble of introducing the required compatibility code to keep applications working after such a change.
On Fri, Dec 4, 2009 at 9:11 AM, sdphil <[email protected]> wrote: > is it intended to only work that way in 1.5? what's the rationale > behind intending it to work that way? it seems at odds with the > intent (pun intended) of having a setIntent method. > > On Dec 3, 4:58 pm, Dianne Hackborn <[email protected]> wrote: > > That is working as intended. If you want to retain that change, you will > > need to store it in the saved state. Generally I would suggest not doing > > this. > > > > > > > > On Thu, Dec 3, 2009 at 4:15 PM, sdphil <[email protected]> > wrote: > > > on Android 1.5, is setIntent / getIntent broken? > > > > > Here's my scenario. > > > > > I have an activity and it does some action based on the intent. > > > > > Then later, I modify the intent by -- > > > > > Intent intent = getIntent(); > > > // modify the intent here... > > > setIntent(intent); > > > > > Then, I switch to landscape mode (change orientation). > > > > > When I call getIntent() - I get the very first intent, not the > > > modified intent. > > > > > If I call getIntent() after I call setIntent(), it looks like the > > > changes i made to the intent have taken place; the intent is modified > > > as expected, it's only after I change orientation that i re-fetch the > > > intent and it seems to give the first intent. > > > > > The unusual thing is that this works fine in Android 1.6 or later, but > > > does not work in Android 1.5. > > > > > Known issue? > > > > > tia. > > > > > -- > > > 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%[email protected]> > <android-developers%[email protected]<android-developers%[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. > > -- > 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%[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. -- 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

