Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert Existing Windows 10 UWP Application in Android

I've found a few examples, as I in a Xamarin.Native use a Windows UWP. But that would mean that I a Xamarin.Nativ in a Windows UWP Convert. I would like convert a finished Windows UWP application to the target Android or iOS. Is that generally supported or needs my UWP application rebuild again with Xamarin?

Links:

Adding a Universal Windows Platform (UWP) App

Getting Started with Xamarin.Forms 2.0’s Windows 10 Preview

like image 593
Carsten Cors Avatar asked May 31 '16 09:05

Carsten Cors


People also ask

Can UWP apps run on Android?

With Xamarin, UWP developers can not only reach all Windows 10 devices, but they can now use a large percentage of their C# code to deliver a fully native mobile app experiences for iOS and Android."

Is Microsoft discontinuing UWP?

Microsoft has announced that the OneNote UWP app will no longer show up in the Microsoft Store, though it will continue to work for now.

How do I get rid of UWP app?

This is the supported way of exiting a UWP app: Application. Current. Exit();

How do I change my UWP version?

Additionally, you can change the Target Version and Minimum Version of your UWP app in the application section of the app's Properties. Target Version. The version of Windows 10 or Windows 11 that your app is intended to run on. This sets the TargetPlatformVersion setting in your project file.


2 Answers

Unfortunately asfar as I know there is no converter that allows to convert UWP app to Android app straight forward.

There are few ways to make the whole process a lot much more easier (so you can create your Android app faster). If you wrote your UWP application and separated common code that can be used in the other applications you can also use it in Xamarin.Android app - the best way is to have PCL with the common code. It is also important which type of Xamarin app you would like to create:

1) Xamarin Forms - common UI for each app: Windows, Android and iOS. There is one shared code that can be used by them. Remember that Xamarin Forms apps are generally speaking the best for displaying the data and they are limited with reference to platform specific functionality.

Please see below to read more:

https://docs.xamarin.com/guides/cross-platform/application_fundamentals/building_cross_platform_applications/sharing_code_options/

2) Xamarin.Platfrom (so Xamarin.Android and Xamarin.iOS):

Here you can create native UI foreach of the project (Windows, Android and iOS) and access specific platform functionality. With reference to the code - you can put common code in one PCL and have access to it from each project.

Please see this site - here you can find different Xamarin options to create cross-platfrom apps:

https://developer.xamarin.com/

like image 154
Daniel Krzyczkowski Avatar answered Sep 21 '22 15:09

Daniel Krzyczkowski


Firstly, if you want a shared code, using Portable class library, you can use the same code for all the platforms including WPF, Android and iOS. First of all what you can do is convert the codes that is used again and again in the PCL (Portable Class Lirary). Once you get used to PCL, you can easily work on any platform you want.

As the Android, iOS are different from windows, a lot of .net framework functionality is not supported in PCL. Although, once you create the basics in PCL, you can integrate the class library in android as well as iOS.

like image 40
Chandan Gupta Avatar answered Sep 20 '22 15:09

Chandan Gupta