public override bool OnStartJob(Android.App.Job.JobParameters @params) { this.cancelSrc = new CancellationTokenSource(); CrossJobs .Current .RunAll(this.cancelSrc.Token) .ContinueWith(x => this.JobFinished(@params, false)); //.ContinueWith(x => this.JobFinished(@params, true)); return(true); }
public override bool OnStopJob(Android.App.Job.JobParameters @params) { this.cancelSrc?.Cancel(); return(true); }