Background tasks-Xamarin forms

0

The specific question is, if in xamarin forms can tasks be executed in the background or does it have to be native in each platform?

    
asked by Armando Wells 22.01.2018 в 21:56
source

1 answer

0

It depends on what you want to do. As a general rule, If your background task is long-lasting, you should use the mechanism corresponding to each platform. If it's short, you can use the standard ...

Task.Run(() => {
// tu código
});
.

In addition, there are certain typical use cases that have special mechanisms, for example the background download of files. For that particular case there is a plugin ( HttpTransferTasks ). Depending on your need, there may already be a plugin. I suggest you review the list of official Xamarin plugins and see if your requirement is covered.

    
answered by 24.01.2018 / 18:35
source