Skip to content

felipedb-huawei/Maps2.0

Repository files navigation

Huawei Xamarin Map Demo

Contents

  • Introduction
  • Installation Guide
  • React-Native Example Method Definition
  • Configuration Description
  • Licensing and Terms

1. Introduction

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.

2. Installation Guide

Before using the Xamarin SDK code, ensure that Visual Studio 2019 is installed with "Mobile development with .NET" support.

2.1 Huawei Xamarin Map Library

You can retrieve the library from developer.huawei.com

2.2 Download native Android SDK packages

The Map SDK and its dependencies must be downloaded from the Huawei repository. Use the following URLs to download the packages.

2.3 Open the library project

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".

2.4 Import the downloaded packages

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

2.5 Build the library.

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)

2.6 Copy the libary .dll files

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.

2.7 Run the application

You can now run your application and it should automatically start up on your mobile device.

3. Xamarin Example method definition

No. Developer can flexibly develop projects based on the example code.

4. Configure parameters.

No.

5. Licensing and Terms

Huawei Xamarin SDK uses the Apache 2.0 license.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages