locked
Is possible to creating cross-platform services in Xamarin? RRS feed

  • Question

  • User145782 posted

    Hi guys!

        Our company is working to create a service to synchronize data between Cross Platform App and an external server. The pre-requisite of this task is run this mechanisn like a service. We know that is possible to create Service in Android and backgrounding techniques in IOS using Xamarin. But, the best solution would be a cross platform service. Reading the Xamarin documentation we didn't found articles talking about how to do it using cross platform services. Is possible to create a cross platform services? If not, what the best way using Xamarin? Will we need to create different code for all platforms: IOS, Windows and Android?
    

    Thank you in advance.

    Friday, April 15, 2016 6:36 PM

Answers

  • User43601 posted

    You could implement a fair amount of data synchronisation logic in cross platform code (communication with your server, local database access, caching, business logic, etc.) and then simply consume that code from Android service and iOS background task.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Tuesday, April 19, 2016 11:33 PM

All replies

  • User214015 posted

    Hello Luiz,

    What kind of cross platform service are you looking for? I was doing something similar and these links helped me: https://developer.xamarin.com/guides/cross-platform/applicationfundamentals/webservices/

    However, as the link indicates these are web services.

    Saturday, April 16, 2016 1:17 PM
  • User43601 posted

    You could implement a fair amount of data synchronisation logic in cross platform code (communication with your server, local database access, caching, business logic, etc.) and then simply consume that code from Android service and iOS background task.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Tuesday, April 19, 2016 11:33 PM