I'm learning Xamarin and I noticed there are two ways of implementing maps, both have official documentation on MS docs pages.
Xamarin.Forms.Maps
Xamarin.GooglePlayServices.Maps
I couldn't find any information on what is the difference between both approaches. Which one should I use?
Xamarin.GooglePlayServices.Maps is how you would add maps to a Xamarin.Android App, when not using Xamarin.Forms.
If you look at the Xamarin.Forms.Maps the list of dependencies for Xamarin.Android contains Xamarin.GooglePlayServices.Maps.
What Xamarin.Forms.Maps does is to abstract Google Maps to be used from a Xamarin.Forms App.
Related
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.
I am trying to add the AppCenter SDK functionality to my Xamarin Forms app (iOS and Android) and am following the documentation from here.
I am experiencing an issue with the namespaces not seeming to line up quite right. Here is a screenshot with some comments:
As you can see, AppCenter.Start(...) does not appear to exist but Microsoft.AppCenter.AppCenter.Start(...) does.
The shared project for my Xamarin Forms app is a .NET Standard 2.0 shared lib.
Any thoughts on what could be causing this?
Additional setup screenshots:
As you can see the screenshot attached, AppCenter is a class under Microsoft.AppCenter namespace, so what you are writing is correct only Microsoft.AppCenter.AppCenter.Start(...)
You can find the same by pressing F12 on AppCenter in AppCenter.Start(...)
I want to implement PDF Viewer with annotations in Xamarin Cross Platform apps (UWP, Android & ios). As per suggestion on (https://components.xamarin.com/gettingstarted/pdfnet-mobile-sdk?version=1.0.0). How can we implement PDFnet PDFViewer in Xamarin Forms portable library? since they written separate libraries and code for different platforms or should we use native apps?.
That is an old version that is no longer updated. To get the latest Xamarin SDK please fill in this form.
https://www.pdftron.com/pdfnet/mobile/request_trial.html
I have a Xamarin iOS unified app.
I want to add a Xamarin form to it.
How can I do this?
Thanks,
Kaustubh
-You can not do it directly.
-Create a Xamarin PCL project, it will create a shared project and native projects to iOS and Android
-You can add you Xamarin native project, necessary files to it
-Create a page renderer in Xamarin Forms Shared project
-Use it to load required page from native project
-Page renderer will act as a native page.You can call your native functions, UI from that point onwards.
Xamarin forms is a kind of project, not a form you can add to a project that is not xamarin forms
You can just add a new project of type Xamarin.Forms in your solution and you'll then have to port your code or share as much as possible through a PCL.
Source and reference : developer.xamarin.com/guides/cross-platform/xamarin-forms/
[Edited to take comments into accounts]
I am creating a simple application with Xamarin for Mac.
I need to provide a decouple architectural elements into solution, but haven't found any information on dependency injection in Xamarin for Mac.
Xamarin.Forms seems to have an IoC NuGet packages, but it is not possible to add Xamarin.Forms into a Xamarin.Mac project, since the current version of Xamarin.Forms (1.2.2) isn't compatible with .Net 4 targeting projects (Xamarin for Mac by default targets .net 4)
Please point me to some information on IoC in Xamarin for Mac.
There's a pretty good article by Rob Gibbens, a Xamarin University instructor, on using IoC containers in Xamarin projects.
IoC Containers with Xamarin
The examples are using Xamarin.iOS for illustrative purposes but I have to imagine that it could work with any of the Xamarin platform projects.
Personally I am a fan of Autofac in general and have played around with it in Xamarin before and it seems to work fine.