On 18 Mai, 01:22, Bob Lee <[email protected]> wrote:
> My activity can be reused in multiple tasks concurrently. It stores a photo
> associated with the task in a file. If the task is abandoned, how can I know
> to delete the photo?
>
> Currently, I'm planning on keeping a fixed size queue of photos and deleting
> the eldest photo when the max size is reached.

Hi Bob,

Wha do you mean bay "abanddoned" -   the only callback for activity
you can rely
on is onPause() , which will be called when it leaves user focus.
After
this it may be killed sometime, or brought to front( onResume() will
be called )

I would delete old photos when new one is arrived.  As for data
keeping,  you
may store queue on provate preferences.

regards,

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