Forum Xamarin Cross Platform with Xamarin

Want to port/convert C# app to Android

aftabnaqviaftabnaqvi USMember

Hi Everyone,

I have a console application written in C# (its a demo-server without any UI). I want to run that app on Android.

On Android it should be running in background so other application(s) can run in foreground and can connect to this app and get the data.

Looking for suggestions and steps to make it happen.



  • XamarinGURUXamarinGURU USMember ✭✭

    Hi Aftabnaqvi!

    You can use your code on Xamarin.Forms project. We can develop mobile app using Xamarin and are using C# language to develop Xamarin.
    If you use your code as SharedCode it would be great.

    Try like this : Create the Xamarin.Forms Solution in Visual Studio or Xamarin Studio
    And you can add your source code(*.cs) in your solution.

    I hope it helps you!

  • XamarinGURUXamarinGURU USMember ✭✭

    I have already tried this way and get successful.

  • aftabnaqviaftabnaqvi USMember

    Hi XamarinGURU,

    Thanks for your response. Xamarin.Forms will create a UI based application for Android?

    Little more clarification on SharedCode. This approach looks better but I don't have much experience with SharedCode and Xamarin.

    My existing app structure looks like following.

    DemoServer (.exe) (Main project)

    Actually, I am NOT the author of the app but I am porting it android.

    Would I be able to convert all 5 components to SharedCode? and then use DemoServer's code into Android app?
    Also, can I write services for Android in Xamarin.Android?

    Please explain little bit more.

    Appreciate your help.


  • XamarinGURUXamarinGURU USMember ✭✭

    of course you can use DemoServer code for Xamarin.Forms project(Android, iPhone). Guide as following:

    Import Demoserver code to Xamarin.Portal

    I hope it helps you.
    Regards! :)

  • aftabnaqviaftabnaqvi USMember

    Thanks @XamarinGURU!

    Your pointers were helpful. Finally, I converted all my C# libraries to Java libraries and called into Android app. Things are working. Thanks again.

Sign In or Register to comment.