public bool IsRegistered(string taskName) { var infos = AppWorkManager.GetWorkInfosByTag(taskName).Get(); Java.Util.ArrayList list = infos.JavaCast <Java.Util.ArrayList>(); if (list.IsEmpty) { return(false); } WorkInfo info = (WorkInfo)list.Get(0); Log.Info(Tag, "Work {0} is {1}", taskName, info.GetState().ToString()); #if DEBUG for (int i = 0; i < list.Size(); i++) { info = (WorkInfo)list.Get(i); Log.Debug(Tag, "Work state: {0}", info.GetState().ToString()); } #endif return(true); }