About Nuget packages
NuGet is the Microsoft-supported mechanism for sharing code, which defines how packages for .NET are created, hosted, and consumed, and provides the tools for each of those roles. Put simply, a NuGet package is a single ZIP file with the .nupkg extension that contains compiled code (DLLs), other files related to that code, and a descriptive manifest that includes information like the package's version number. Developers with code to share create packages and publish them to a public or private host. Package consumers obtain those packages from suitable hosts, add them to their projects, and then call a package's functionality in their project code. NuGet itself then handles all of the intermediate details.
In this article is description how to use NuGet Package Manager UI and include our NuGet package in your project.
Current Packages
In DEM solution we delivering five nuget packages
You can add the DEM assemblies directly to your projects by using the NuGet packages H
Depedency list of packages
Depedency list of packages are listed below (Get-Package -ListAvailable https://docs.microsoft.com/en-us/nuget/reference/ps-reference/ps-ref-get-package)
!Important Bold packages are planned for remove for example Plugin.Permissions will be removed and we will use one from Xamarin.Essntials and instaned ExpandableView we will use Xamarin Forms Expander
AssecoSEE.Rest.Data
Id | Versions | Url |
---|---|---|
System.ComponentModel | {4.3.0} | https://www.nuget.org/packages/System.ComponentModel |
Newtonsoft.Json | {12.0.3} | https://www.nuget.org/packages/Newtonsoft.Json |
System.ComponentModel.Annotations | {4.7.0} | https://www.nuget.org/packages/System.ComponentModel.Annotations |
NETStandard.Library | {2.0.3} | https://www.nuget.org/packages/NETStandard.Library |
AssecoSEE.DEM.Core
AssecoSEE.DEM.Components
AssecoSEE.DEM.Devices
Id | Versions | Url |
---|---|---|
Plugin.CurrentActivity | {2.1.0.4} | https://www.nuget.org/packages/Plugin.CurrentActivity |
{1.0.0} | ||
Xamarin.Essentials | {1.5.3.2} | https://www.nuget.org/packages/Xamarin.Essentials |
NETStandard.Library | {2.0.3} | https://www.nuget.org/packages/NETStandard.Library |
Xamarin.Forms | {4.7.0.1179} | https://www.nuget.org/packages/Xamarin.Forms |
{28.0.0.3} | ||
{28.0.0.3} | https://www.nuget.org/packages/Xamarin.Android.Support.Annotations | |
{28.0.0.3} | https://www.nuget.org/packages/Xamarin.Android.Support.Compat | |
{28.0.0.3} | https://www.nuget.org/packages/Xamarin.Android.Support.Core.Utils | |
{28.0.0.3} |
AssecoSEE.DEM.Foundation
AssecoSEE.DEM.Payment
Id | Versions | Url |
---|---|---|
Xam.Plugin.Media | {5.0.1} | https://www.nuget.org/packages/Xam.Plugin.Media |
Xamarin.Essentials | {1.5.3.2} | https://www.nuget.org/packages/Xamarin.Essentials |
NETStandard.Library | {2.0.3} | https://www.nuget.org/packages/NETStandard.Library |
Xamarin.Plugin.FilePicker | {2.1.41} | https://www.nuget.org/packages/Xamarin.Plugin.FilePicker |
Xamarin.Forms | {4.7.0.1179} | https://www.nuget.org/packages/Xamarin.Forms |
AssecoSEE.DEM.AccountData
Id | Versions | Url |
---|---|---|
Microcharts | {0.9.5} | https://www.nuget.org/packages/Microcharts |
{4.1.0} | ||
Microcharts.Forms | {0.9.5} | https://www.nuget.org/packages/Microcharts.Forms |
SkiaSharp | {2.80.1} | https://www.nuget.org/packages/SkiaSharp |
Xam.Plugin.Media | {5.0.1} | https://www.nuget.org/packages/Xam.Plugin.Media |
NETStandard.Library | {2.0.3} | https://www.nuget.org/packages/NETStandard.Library |
Xamarin.Plugin.FilePicker | {2.1.41} | https://www.nuget.org/packages/Xamarin.Plugin.FilePicker |
Xamarin.Forms | {4.7.0.1179} | https://www.nuget.org/packages/Xamarin.Forms |
All packages are stored in folder AssecoSEEDEM, and from that place is nesseary to root them throw the Package Manger in Visual Studio and in next lines are samples with images how to do that on your OSX or Windows.
!NOTE In any time you can check packages in solution from package console in Visual Studio calling
example Get-Package -project SolutionName
Or for .NET projects from PowerShell ot terminal on OSX example dotnet list SolutionName.csproj package
OS X / macOS
Package -> Add NuGet Packages -> Select Configure Sources from dropdown -> Select ADD -> Name package as AssesoSEEDEM and find package location on your machine.
Windows
Manage Nuget packages -> Settings -> Plus and then Name package as AssesoSEEDEM and find package location on your machine.
Application specific dll-s
Application
Id | Versions | Url |
---|---|---|
Microsoft.AppCenter.Distribute | {3.3.0} | https://www.nuget.org/packages/Microsoft.AppCenter.Distribute |
Microsoft.AppCenter.Analytics | {3.3.0} | https://www.nuget.org/packages/Microsoft.AppCenter.Analytics |
NETStandard.Library | {2.0.3} | https://www.nuget.org/packages/NETStandard.Library |
Microsoft.AppCenter.Crashes | {3.3.0} | https://www.nuget.org/packages/Microsoft.AppCenter.Crashes |
Xamarin.Forms | {4.7.0.1179} | https://www.nuget.org/packages/Xamarin.Forms |
Autofac | {4.6.1} | https://www.nuget.org/packages/Autofac |
Microsoft.AppCenter | {3.3.0} | https://www.nuget.org/packages/Microsoft.AppCenter |
Android
Id | Versions | Url |
---|---|---|
Acr.UserDialogs | {7.1.0.446} | https://www.nuget.org/packages/Acr.UserDialogs |
Com.Airbnb.Android.Lottie | {3.4.2} | https://www.nuget.org/packages/Com.Airbnb.Android.Lottie |
Com.Airbnb.Xamarin.Forms.Lottie | {3.1.2} | https://www.nuget.org/packages/Com.Airbnb.Xamarin.Forms.Lottie |
CsvHelper | {15.0.5} | https://www.nuget.org/packages/CsvHelper |
Microcharts.Forms | {0.9.5} | https://www.nuget.org/packages/Microcharts.Forms |
Newtonsoft.Json | {12.0.3} | https://www.nuget.org/packages/Newtonsoft.Json |
Plugin.CurrentActivity | {2.1.0.4} | https://www.nuget.org/packages/Plugin.CurrentActivity |
Plugin.FirebasePushNotification | {3.3.10} | https://www.nuget.org/packages/Plugin.FirebasePushNotification |
Plugin.Permissions | {6.0.1} | https://www.nuget.org/packages/Plugin.Permissions |
{4.1.0} | ||
Portable.BouncyCastle | {1.8.6.7} | https://www.nuget.org/packages/Portable.BouncyCastle |
Rg.Plugins.Popup | {2.0.0.3} | https://www.nuget.org/packages/Rg.Plugins.Popup |
System.Net.Http | {4.3.4} | https://www.nuget.org/packages/System.Net.Http |
System.Net.Primitives | {4.3.1} | https://www.nuget.org/packages/System.Net.Primitives |
Xam.Plugin.HtmlLabel | {4.1.3} | |
Xam.Plugin.Media | {5.0.1} | https://www.nuget.org/packages/Xam.Plugin.Media |
Xam.Plugins.Forms.ImageCircle | {3.0.0.5} | https://www.nuget.org/packages/Xam.Plugins.Forms.ImageCircle |
{28.0.0.3} | https://www.nuget.org/packages/Xamarin.Android.Support.Animated.Vector.Drawable | |
{28.0.0.3} | https://www.nuget.org/packages/Xamarin.Android.Support.Annotations | |
{28.0.0.3} | https://www.nuget.org/packages/Xamarin.Android.Support.Compat | |
{28.0.0.3} | https://www.nuget.org/packages/Xamarin.Android.Support.Core.UI | |
{28.0.0.3} | https://www.nuget.org/packages/Xamarin.Android.Support.Core.Utils | |
{28.0.0.3} | https://www.nuget.org/packages/Xamarin.Android.Support.Fragment | |
{28.0.0.3} | https://www.nuget.org/packages/Xamarin.Android.Support.Media.Compat | |
Xamarin.AndroidX.AppCompat.Resou... | {1.1.0.1} | |
Xamarin.AndroidX.VectorDrawable.... | {1.1.0.1} | |
Xamarin.AndroidX.Annotation | {1.1.0.1} | |
Xamarin.AndroidX.Core | {1.1.0.1} | |
Xamarin.AndroidX.Legacy.Support.... | {1.0.0.1} | |
Xamarin.AndroidX.Legacy.Support.... | {1.0.0.1} | |
Xamarin.AndroidX.Fragment | {1.1.0.1} | |
Xamarin.AndroidX.Media | {1.1.0.1} | |
Xamarin.AndroidX.Browser | {1.0.0.1} | |
Xamarin.AndroidX.Legacy.Support.V4 | {1.0.0.1} | |
Xamarin.AndroidX.Lifecycle.LiveData | {2.2.0.1} | |
Xamarin.AndroidX.MediaRouter | {1.1.0.1} | |
Xamarin.Essentials | {1.5.3.2} | https://www.nuget.org/packages/Xamarin.Essentials |
Xamarin.FFImageLoading | {2.2.21} | https://www.nuget.org/packages/Xamarin.FFImageLoading |
Xamarin.FFImageLoading.Forms | {2.2.21} | https://www.nuget.org/packages/Xamarin.FFImageLoading.Forms |
Xamarin.Forms | {4.7.0.1179} | https://www.nuget.org/packages/Xamarin.Forms |
{28.0.0.3} | https://www.nuget.org/packages/Xamarin.Android.Support.Design | |
{28.0.0.3} | https://www.nuget.org/packages/Xamarin.Android.Support.v7.AppCompat | |
{28.0.0.3} | https://www.nuget.org/packages/Xamarin.Android.Support.v4 | |
{28.0.0.3} | https://www.nuget.org/packages/Xamarin.Android.Support.v7.CardView | |
{28.0.0.3} | https://www.nuget.org/packages/Xamarin.Android.Support.v7.MediaRouter | |
{3.0.12} | ||
Xamarin.Google.Android.Material | {1.0.0} | |
Xamarin.AndroidX.AppCompat | {1.1.0.1} | |
Xamarin.AndroidX.CardView | {1.0.0.1} | |
Xamarin.AndroidX.Migration | {1.0.6.1} | |
Xamarin.Firebase.Common | {71.1610.4} | |
Xamarin.Firebase.Messaging | {71.1740.4} |
IOS
We also deliver dll-s for mToken and Instant payment specific for each platform:
Android
ExternalDependencies\MTokenBinding\merged.ipmt.binding.droid.dll
iOS
ExternalDependencies\InstantPaymentBinding\ip.binding.ios.dll
ExternalDependencies\MTokenBinding\mt.binding.ios.dll
More about SDK for Instant Payment and mToken in next lines
Instant Payment
InstantPaymentSdk is intended to provide methods for creating QR code within specified format, reading QR, providing NFC service for communicating with POS device and providing methods for parsing read content from NFC or QR.
SDK uses googles Zxing library to implement usage of QR code reader and generator. As such, Zxing is included within SDK and should not be included in the applications dependencies. Before building SDK, following is necessary :
- License key
- Icon for apduServiceBanner (one that is visible in device settings)
- Name for apdu service (one that is visible in device settings)
- AIDs (if POS devices has AID other than well knows ones, it should be provided)
Android
instant-payment-sdk-1.7-17-instantPayment-release.aar
Used technologies in SDK limit minimum android version to 19 (Android 4.4). Target version is latest currently available -28 (Android 9.0) SDK is written in Kotlin and as such must have Kotlin dependencies included either in the project, or the library itself.
Manifest overview
All permission necessary for proper functionality of the SDK are declared within the manifest. SDK Manifest will be merged with implementing applications manifest upon compile time.
Permission required for HCE card emulation
<uses-permission android:name="android.permission.NFC"/>
Permission required for QR code scan
<uses-permission android:name="android.permission.CAMERA"/>
Camera permission is considered as dangerous permission Optional permissions required for zxying library
<uses-feature
android:name="android.hardware.camera"
android:required="false"/>
<uses-feature
android:name="android.hardware.camera.front"
android:required="false"/>
<uses-feature
android:name="android.hardware.camera.autofocus"
android:required="false"/>
<uses-feature
android:name="android.hardware.camera.flash"
android:required="false"/>
<uses-feature
android:name="android.hardware.screen.landscape"
android:required="false"/>
<uses-feature
android:name="android.hardware.wifi"
android:required="false"/>
HCE service
<service android:name=".nfc.service.HostCardEmulationService" android:exported="true" android:permission="android.permission.BIND_NFC_SERVICE"> <intent-filter>
<action android:name="android.nfc.cardemulation.action.HOST_APDU_SERVICE"/> </intent-filter> <meta-data android:name="android.nfc.cardemulation.host_apdu_service" android:resource="@xml/apduservice"/> </service>
iOS InstantPaymentSDK 1.0.2
NuGet packages to Install for InstantPaymentSDK:
https://www.nuget.org/packages/Xamarin.Swift/
Adding Camera Permission
When QR code scanning is started the application will crash if NSCameraUsageDescription is not added to Info.plist file. To add it, Info.plist needs to be opened in an external editor and NSCameraUsageDescription needs to be added. In Demo project it is added to lines 15 and 16:
<key>NSCameraUsageDescription</key>
<string>Application needs camera access to scan QR code</string>
mToken
Android
instant-payment-sdk-1.7-17-instantPayment-release.aar
iOS
MobileTokenSDK 12.2.0
NuGet package to Install for MobileTokenSDK:
https://www.nuget.org/packages/Xamarin.Swift/
Note
More of Instant Payment and MToken is in official documentation provided by Asseco HR
Other resources