- Introduction
- Installation Guide
- React-Native Example Method Definition
- Configuration Description
- Licensing and Terms
The demo project is an example that aims to demonstrate how the HUAWEI Map Kit SDK for Xamarin can be used.
The Xamarin SDK wraps the Android SDK with Managed Callable Wrappers through the usage of Android Bindings Library projects. It provides the same APIs as the native SDK.
The Xamarin SDK libraries are described as follows:
- Library .DLL files: These are the files enable the usage of the native Android SDK interfaces. Once generated, these files can be referenced & used directly in a Xamarin.Android project.
Before using the Xamarin SDK code, ensure that Visual Studio 2019 is installed with "Mobile development with .NET" support.
You can retrieve the library from developer.huawei.com
The Map SDK and its dependencies must be downloaded from the Huawei repository. Use the following URLs to download the packages.
- agconnect-core-1.0.0.300
- tasks-1.3.3.300
- base-4.0.0.300
- dynamic-api-1.0.13.300
- location-4.0.2.300
- maps-4.0.1.300
- maps-base-4.0.1.300
- network-common-4.0.2.300
- network-grs-4.0.2.300
An Android Bindings Library project for Xamarin allows the usage of only one .aar file. For this reason the library repository comes with multiple library projects.
Open up Visual Studio 2019. Then from the menu;
- Click "Open a project or a solution"
- Navigate to the directory where you cloned the repository and open "xamarin-map-4.0.3.sln".
Once you open the library project for the Map SDK, each package you downloaded in the first step must placed under its related library project.
Inside the "Solution Explorer", expand each project and repeat the steps below:
-
Right click "Jars" -> "Add" -> "Existing Item" (Shift + Alt + A)
-
Navigate to the folder where you downloaded the packages and select the related .aar or .jar file.
Example: For XHmsMaps-4.0.1.300 project, import "maps-4.0.1.300.aar"
-
Click on the package file you just imported. In the properties window,
- set the Build Action as "LibraryProjectZip" if the file type is .aar
- set the Build Action as "EmbeddedJar" if the file type is .jar
From the Visual Studio's toolbar, click "Build" -> "Build Solution" (Ctrl + Shift + B). Once the build process is complete, generated classes should be visible in the object browser and ready to use.
(View -> Object Browser) (Ctrl + Alt + J)
Once you build the Map SDK library project, the generated .dll files should be copied inside the demo project.
- Copy the .dll files from "xamarin-hms-map-library-4.0.3\dist"
- To the "xamarin-hms-map-demo-4.0.3_LibDlls" folder of the demo project.
You can now run your application and it should automatically start up on your mobile device.
No. Developer can flexibly develop projects based on the example code.
No.
Huawei Xamarin SDK uses the Apache 2.0 license.