更新时间:2023-02-26 21:18:25
这是我找到的唯一解决方案 http://arteksoftware.com/backgrounding-with-xamarin-forms/ >
几句话: 您无法在Xamarin.Forms中提取后台任务,因为iOS,Android和WP的工作方式不同.您必须使用MessagingCenter从每个平台的特定实现中发送和接收数据
I'm new to Xamarin platform. I'm developing an application for all three major platforms (WP,iOS,Android) using Xamarin.forms. How can I sync data with my server in the background -> I need something similar to Android Service. I want to sync the data even when the user goes to a different screen of the app. It would be great if I could continue syncing the data even when the user leaves the app.
Thank you
This is the only solution i have found http://arteksoftware.com/backgrounding-with-xamarin-forms/
in a few words: You can't abstract background tasks in Xamarin.Forms because iOS, Android and WP works in a different way. You have to use MessagingCenter to send and receive data from specific implementations in each platform