Exemplo n.º 1
0
        public void RunTask(AppTask task)
        {
            AddJob(task);

            // fire the task
            Console.WriteLine("long task");

            Android.App.Application.Context.StartService(new Intent(Android.App.Application.Context, typeof(TaskService)));
            var TaskServiceConnection = new TaskConnection(null, task);

            Intent TaskServiceIntent = new Intent(Android.App.Application.Context, typeof(TaskService));

            Android.App.Application.Context.BindService(TaskServiceIntent, TaskServiceConnection, Bind.AutoCreate);
        }
Exemplo n.º 2
0
		public void RunTask(AppTask task)
		{
			AddJob (task);

			// fire the task
			Console.WriteLine ("long task");

			Android.App.Application.Context.StartService (new Intent (Android.App.Application.Context, typeof(TaskService)));
			var TaskServiceConnection = new TaskConnection (null, task);

			Intent TaskServiceIntent = new Intent (Android.App.Application.Context, typeof(TaskService));

			Android.App.Application.Context.BindService (TaskServiceIntent, TaskServiceConnection, Bind.AutoCreate);

		}