Not too scary if you look at my scenario ;-)

I have devices that I rent out to end-users through a hotel/concierge.
These devices hold 1) my app, 2) browser, 3) facebook app.
End-users (hotel guests) can rent the devices and return it to the
hotel. The non-technical hotel concierge needs to be able to clear all
user data with one click from 1) my app before handing it to another
guest, without needing to go through the application settings of each
application, clear data there. For a non-technical person, those would
be too many steps. In fact, the concierge doesn't even have access to
the device settings (he can only move around the mentioned three
apps).
Therefore I need a way to clear the data programmatically via script
(one button click in my app). But I don't want to need a force a
device reboot if that's not really necessary.

I'd like to understand what's happening here, i.e. how can the two
have the same instance state / bundle? Just because the two activities
have the same package / class name? And also, why is there a
difference whether the activity was last in the foreground or not.
Ok..., I'm probably repeating what I already mentioned above.

I know it's kind of a special use-case I'm having here... still trying
to find a good solution hopefully without needing to force a reboot. I
appreciate your input or any other ideas for such scenario. Thanks.


On Nov 9, 1:14 am, Mark Murphy <mmur...@commonsware.com> wrote:
> On Mon, Nov 8, 2010 at 11:38 AM, Mathias Lin <m...@mathiaslin.com> wrote:
> > thanks for your reply. Yes, it's probably managed by the system, yet
> > I'm still wondering:
>
> > Below you can see that the browser activity runs in different
> > processes (#2307, #5536) before and after I killed/restarted it, and
> > yet it's displaying / restoring the same UI input values entered by
> > the user, regardless of being in an entire new process.
>
> That make sense.
>
> > So, are the two activities in these two processes actually the same
> > instance?
>
> That's not possible. Each process has its own VM. However, they might
> have the same *instance state* (i.e., Bundle).
>
> I have no real idea what you're trying to accomplish here -- what you
> originally posted sounds scary. However, the answer for dealing with
> all this in-flight instance state stuff is to reboot the phone. Since
> you're running a rooted phone, I would think there's a way to reboot
> it.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, One Low Price!

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