HMS Solar2D Plugin Integration

Kayahan Başkeser
Huawei Developers
Published in
4 min readJan 22, 2021

--

Hi everyone,

In this article, I will mention about HMS Solar2D Plugin Integration step by step.

Use link below to see all Solar2D HMS plugins.

1- Register Huawei Developer

To use HMS kits, you need to register on the Huawei Developer website. If you have an account, you can skip this step. Sign in with your account.

2-Create an app in AppGallery Connect

In this step, you need to create an app in App Gallery Connect and do the necessary configurations.

First, let’s login to the Huawei Developer website and click on the console section.

Then, click on the AppGallery Connect section and access the AppGallery Connect.

Here you should click on the my project section and let’s create a project for your app.

Click on Add Project and type a name for your project.

After project is created, you need to add an app to project by clicking on the add app.

You need to put app name, package name, app category and default language in this section.

If you are going to use IAP (In-App Purchases) in your application, package name must end with “.HUAWEI” or “.huawei”

In “App category” part, you need to select the game and set your default language according to ourselves.

After creating app, lets download the agconnect-services.json file and skip the other steps.

Place the agconnect-services.json file in main.lua directory of your app.

3- Generate Certificate Fingerprint from Keystore

In this step, you need to generate SHA256 Certificate Fingerprint from existing or newly created keystore. And you can use the following command for this operation

keytool -list -v -keystore KeystoreName.keystore

And then you need to define SHA256 Certificate Fingerprint to your project on the Huawei AppGallery.

And then configure “Data storage location”.

Info : You need to activate the HMS Kits you want to use in your project from “Manage APIs”.

After that, we need to declare plugin in the “build.setting” file.

And you have to set minSdkVersion of your app regarding to HMS Kit you use.

And now, you can define and use our plugin in project.

Finally, don’t forget to include the package name and keystore when build the project.

I hope this article was useful.

--

--