Hi,
I'm doing my first app with Mono For Android and loving it so far. I'm trying to get background stuff to work, but it only executes one of my Async Tasks (the first one). Is there some oversight on my part?
public class Foo : AsyncTask
{
static private Foo_instance = null;
static public void Start()
{
if (_instance == null)
{
_instance = new Foo();
_instance.Execute("");
}
}
static public void Stop()
{
_instance.Cancel(true);
}
private Foo() { }
protected override Java.Lang.Object DoInBackground(params Java.Lang.Object[] @params)
{
// DoStuff
}
}
Calling from MainActivity at the end of the OnCreate method:
Foo.Start();
Foo2.Start();
Only the first one gets into the DoInBackground method.
Any ideas? It's driving me nuts :)