Mark Wyszomierski wrote:
> Yeah the problem is that my activity uses a singleton, and if there
> are multiple instances of the activity, they can conflict with each
> other if they are all trying to use the singleton simultaneously:
> 
> TaskA:
>   ActivityB .. singleton.runLongProcess(...);
> 
> Browser:
>   Click link, launch new instance of ActivityB
>   ActivityB ..singleton.runLongProcess(...);

Instead of a pure singleton, use an IntentService or something else that
queues the "long process" jobs.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android Training in US: 14-18 June 2010: http://bignerdranch.com

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