Migrate native Xamarin Android app to .Net MAUI - xamarin

I have a Native Xamarin Android app which is running in Target SDK 30(Android 11). I would like to migrate it into .Net MAUI. I am looking for the steps to do that.
Unable to find a documentation related to that.

Here are two links for your reference.
The article is about Migrating Xamarin.Android Applications to.NET 6. And this about Migrating from Xamarin.Android to.NET 7. It contains two Word docx files NavigationGraph.docx which describes the project and Converting a Xamarin.Android to.Net7.docx describes how to go about the detailed manual migration.
Hope it could help you.

Is there a particular reason why you want to migrate to Maui? Your tags on your post don't indicate any other platform other than Android. If you only want to support Android then I can't think of any reason why you would consider Maui.
Please disregard if that is not the case.

Related

Can I create an Android app using Xamarin only

I'm a Windows developer and have written all sorts of windows client applications using C++ and C#. I wanted to write an Android app and put it on the Google Store, but I'm only equipped with Visual Studio.
I wanted to ask if it is realistic to think that I can create an app, from scratch, including engine and UI using Xamarin only. I saw there are a few Xamarin samples out there, but I didn't want to start only to find out that it's not enough for some reason.
Currently I'm struggling a bit in getting my environment right, but thought I'd throw this question here to you guys ... Maybe it's not even worth starting?
Thanks.
Yes, Xamarin can be used to develop Android apps from scratch. Xamarin has two main libraries that help with this.
Xamarin.Android will give you access to all the Android APIs directly from c#. Note that you still need to know the basic Android concepts like what is an Activity and an Intent.
The other library is Xamarin.Forms. It is a cross-platform library that will give you a basic set of UI controls and widgets that you declare usong an xml syntax, and program with C#. This library has a few limitations, but you can also use the features of Xamarin.Android alongside it to get at the missing features.
Some advice: if possible, develop and debug directly on an Android tablet. Android emulators are not that good and hard to configure. Hope this helps.
There are 2 types of Xamarin you can use.
Xamarin Forms : Which is the unified version that use XAML for the UI. It is very recommended to use this if you are building a simple application.
Xamarin Native : The "native" version of platform that are written in C#, if you want to create Android-only apps, I really recommend this, since it's very similar with the native Android code, but it's wrapped using C# (You can still using nuget package).

How to use XLABS FrameWork

Currently I am learning Xamarin. While searching MVVM Pattern, I found XLABS Framework.
I have tried downloaded XLABS (https://github.com/XLabs/Xamarin-Forms-Labs) and try to execute it but its generate error. "System" not found. "Xamarin.Forms" not found. blah blah blah.......
I have tried to resolved it and finally execute it in Android Simulator, but its crash while launching.
Please anyone guide me how to use XLABS (https://github.com/XLabs/Xamarin-Forms-Labs) Framework using Visual Studio 2017.
Its would be great if anyone suggest, any help document or readymade sample using XLABS to download.
Thanks in advance for time.
Waiting for reply
Regards
Kapil Dave
XLabs is no longer maintained and they state it may no longer work with newer versions of Xamarin Forms.
I would recommend using FreshMvvm as an MVVM framework.
It was specifically designed to work with Xamarin Forms and I have successfully used it on 3 recent projects.
Here is a starter guide

Xamarin Forms and Entity Framework Core NetStandard

Recently Xamarin announced support for NetStandard (see https://releases.xamarin.com/stable-release-cycle-7-service-release-1/) and the recently shipped Entity Framework Core supports NetStandard. There was a recent issue with the SQLite.Native package that has been resolved (see https://github.com/aspnet/EntityFramework/issues/4269) but when I build the Android version of a Xamarin Forms application it appears it does not include all the assemblies in the output that are needed by the Entity Framework and therefore the application will not run and crashes on the first line of EF code to retrieve data. The UWP version appears to work just fine so this seems like an issue with Android (possibly iOS too).
Has anyone run into this and know a way around it so that the compiled Xamarin Forms Android application will run using Entity Framework Core to access a SQLite database?
Thank you in advance.
Here are the steps you can follow.
Create a Xamarin.Forms project.
Convert the PCL project's properties to .NET Standard 1.3
Install Entity Framework Core and other EF Core stuffs
I have prepared a small hello world project at Github Here.
need to use -linkskip to inform compiler not to remove references.

How to do the UI for Android in Xamarin Starter Edition with VisualStudio 2015 Community?

Thanks in advance!
I haven't tried the free VisualStudio 2015 Community Edition, but I know that it has Xamarin Starter Edition included. I read that it has Xamirin.Android/iOS but not Xamarin.Forms, also that there are certain restrictions.
I wonder how to do the UI in the Starter Edition if it doesn't include Xamarin.Forms. What technology is being used to do the UI in this case (for Android)? Is it MVVM oriented?
If it is somehow possible to do the UI for Android in the starter edition, what UI development approach/pattern is best, so that it's best to migrate to Xamarin.Forms later on? Is it classic MVVM? Or may be it's even easier, so that I will be able to use the same say XAML code...
You are able to design a fully native Android UI using Xamarin. Read the tutorial.
If you want to use the MVVM pattern then you should consider using MvvmCross. Read the tutorials, see the sample codes or watch the N+1 videos.

MvvmCross as "Native" Libraries

I have a project which greatly depends on ServiceStack, unfortunately the V4 releases, which includes PCL release for most platforms(especially after forking out for a Xamarin Licence), is just way out of my price range as an ISV. I have cloned the MvvmCross code but before I start messing around I would like to know what pitfalls I could run into when attempting to create a Non PCL based version compatible with the platforms I target (Currently Xamarin.Android, WPF and WinRT). The idea would be to able to reuse the code for the WPF project to build Android and WinRT clients.
Does anyone have any pointers?
I don't think there is any problem or pitfall with what you are describing - and I don't think you'll need to fork the MvvmCross source.
You should be able to build your apps as native code, and should then be able to reference the MvvmCross PCL libraries directly from the native libraries you are building - you don't need to rebuild MvvmCross to do this. Plenty of people already use MvvmCross using "file linking" rather than PCLs - it's not the default setup encouraged by the Nuget packages, but it still works fine.

Resources