Forum Cross Platform with Xamarin
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Can i know is there any example or details for porting the C#.NET Application to Android?

The application is developed using the technologies (i.e. C#.NET, WPF, WF, WCF, MVVM, PRISM, SQL Compact Edition for meta data storage) need to port to Android. And also the application interacts with the devices via USB and Ethernet to configure and read the data from the device.


  • prashantvcprashantvc USXamarin Team Xamurai
    edited June 2013

    @CBR That's lot of technologies in one application, but sounds interesting :) I will attempt to answer your question, please forgive me if my reply does not provide you any concrete answer.

    Virtually you can use all of your non UI C# code in Android application provided you don't have any Windows specific code exists in your libraries. You can use our new .NET mobility scanner tool to identify how mobile compatible is your code, you can find more details about it here

    WPF, MVVM and PRISM: PRISM is basically designed to develop WPF and Silverlight applications, you may still use parts of PRISM, but I guess it would need a lot of tinkering. If your ViewModels and Models designed well enough you can re-use lot of the code with help of MVVMCross framework or with MVVM-Light (porting to Xamarin platform is still in progress)

    WCF: From Docs - WCF is a Microsoft specific web service technology that aims at abstracting implementation from transport and data technology. Xamarin mobile applications support the consumption of WCF services that are exposed via the BasicHttpBinding protocol, by using the Microsoft Silverlight SLSvcUtil.exe utility for client proxy generation.

    If you're using TCP/IP or any other protocol you may want to add BasicHttpBinding to your service to use it with Xamarin.Android.

    WF: I guess, it's not possible to use WF natively on the device, but you can host you WF as service and consume them on the device via REST or SOAP Web services.

    SQL CE: AFAIK the SQL CE is not supported on iOS and Android platforms, the best alternative is to use SQLite

    USB and Ethernet: Android don't really has a support for Ethernet, you need to use wifi or Bluetooth communication there.
    Most of the standard USB devices (mouse or keyboard) work out of the when you connect them through USB host. But If you're developing a custom USB device you may want to read through Android's accessory documentation here

    I would recommend you to read through our getting started documentation on Cross Platform section here

    Hope this reply helps you at some extent :)

Sign In or Register to comment.