Obsolete OxyPlot package in Nuget - xamarin

Good Day everyone. I'm creating a Xamarin.Forms Portable Application. I want to create Charts using Oxyplot. And I was able to install it in NuGet.
But i saw the description stating
"Please use the platform specific packages, this package is obsolete."
What should I do with this?
Thanks for the help.

Related

How do I manually remove a nuget package for .Net MAUI

I'm in the process of migration a XamarinForms 5 app to MAUI and the latest error I get is
The Java type `mono.android.support.v4.media.session.MediaSessionCompat_OnActiveChangeListenerImplementor` is generated by more than one managed type
Searching online, so far I think it is because the app is using Android.Support.V4 when it should only be using AndroidX, causing the duplicate to be generated as AndroidX replaces Support.V4.
However I cannot figure out how to remove the Support.v4 package because the only reference to it is an implicit reference by an SDK which I cannot remove ( see screenshot below)
The project file (MAUI) only has these package references
Any help greatly appreciated.
Thanks
I'll answer my own question as I managed to figure out the issue after a solid several hours long session.
No packages needed to be removed. Somehow I had managed to install a version of
Birdie.Plugin.FirebasePushNotification from 2020 , instead of `Plugin.FirebasePushNotification', the current version.
The solution was to remove that old package and install the correct once which made the error go away.

Nuget Packages , Xamarin and UWP

Failing to extend my existing project with UWP , i search for reason why certain existing projects can't be extended with UWP.
Here i get an answer that all the nuget packages of X.shared project should be the same(with the same version) in the UWP project.
However , even after doing that the project failed to start , so i asked in the
xamarin-docs github and they tell me that the cause is a nuget package supported only in Ios and Android.
So my question is :
Should all the nuget packages be the same for *.ios *.droid, **.\shared and *.uwp ?
And what if i have other projects(not xamarin projects) in my solution ?
You don't understand the architecture of Xamarin and it is hard to answer in one paragraph, further reading of documentation instead of your constant asking of basically the same question on different places (please note that on the github you where warned that it was not the place to ask such a question) is highly advised.
But I'll try to answer. The package may use (or even need to use) native APIs to achieve some functionalities. Those native APIs are available only on one platform and such code is useless on another platform. So the package author in that case must write the separate implementation for each platform that he wants to support. He may cover just one platform or two or three, it is up to the package author. If the platform is not supported by the package and contains the native APIs, there is almost nothing that you can do aside to write your own implementation of the package for that. Even if you succeed in installing it won't work.

Unable to get gRPC to work in Xamarin Android

I have created a Xamarin Android project. Via NuGet, I have added a reference to the Grpc package.
In my activity, I want to create a Grpc.Core.Server instance, but it won't let me because of the following runtime error:
System.IO.FileNotFoundException: Error loading native library. Not found in any of the possible locations: /storage/emulated/0/Android/data/DecodingPoC.DecodingPoC/files/.override/libgrpc_csharp_ext.x64.so,/storage/emulated/0/Android/data/DecodingPoC.DecodingPoC/files/.override/runtimes/linux/native/libgrpc_csharp_ext.x64.so,/storage/emulated/0/Android/data/DecodingPoC.DecodingPoC/files/.override/../../runtimes/linux/native/libgrpc_csharp_ext.x64.so
I haven't been able to find any information on this for Xamarin, only iOS, so I am hoping someone here can provide a suggestion on how to proceed.
Please note that gRPC c# support for Xamarin is currently experimental. The stable packages in nuget.org don't provide the support yet (that will change with the upcoming v1.15.x release).
See HelloWorldXamarin instructions on how to obtain the correct nuget package (or use the https://www.nuget.org/packages/Grpc.Core/1.15.0-pre1 pre-release package which already supports Xamarin):
https://github.com/grpc/grpc/tree/master/examples/csharp/HelloworldXamarin#experimental-only
You might also need this workaround if you are using Xamarin.Forms: https://github.com/grpc/grpc/issues/16250

How to integrate SSO login in Xamarin

Can you please help me to integrate Single-Sign-On login in Xamarin, Any one gives initiative Idea about it are highly appreciable.
Severity Code Description Project File Line Suppression State
Error Could not install package 'Sunpoin.SSO.Plugin 1.0.0'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v7.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author. 0
I think Sunpoin.SSO.Plugin is a plugin for websites. You must use one that is compatible with MonoAndroid and if possible with PCL binaries.
I recommend you use Xamarin.Auth this component helps you to make an SSO in your Xamarin app.
Here's the best example in StackOverFlow and a tutorial on it.
Good luck

How to read user phone book contacts without using any plugin or package

In my enterprise application need to read user phone book contacts and save into my database. I have searched more but all are suggest, need to install xamarin.mobile package or plugin. In my application have only limited size, so difficult to install package or plugin. Please suggest any idea to read contacts. Thanks in advance.
You need dependency service to be able to do that.
for more information on how to create a dependency service:
https://developer.xamarin.com/guides/xamarin-forms/application-fundamentals/dependency-service/introduction/
You'll need to do this on each platform separately.
How to do it for android: https://developer.xamarin.com/recipes/android/data/contentproviders/read_contacts/
For IOS u can also find on the Xamarin website. But I can't post 2 links
Good luck!

Resources