We need to debug while working on Android applications, include the necessary libraries in the project, follow the documentation and many more. Although it is possible to do these manually, a much more useful solution is now possible, “HMS Core Toolkit”.
What is HMS Core Toolkit?
It is an Android Studio plugin that collects code pieces, additional libraries, auxiliary services during debug and testing that developers can need during the development of their applications, during HMS integration.
What are the Features of HMS Core Toolkit?
- Guide to how to integrate HMS Core into an application created from scratch
- Tools to automatically integrate dependencies into the application you are developing
- Providing practical and fast development in your application with sample codes about kits
- Integration to work with G + H or direct Huawei Core services within your application with GMS dependencies
- Testing the application on pure HMS devices
- Automatic testing of applications on pure HMS devices and monitoring these test outputs
Setup and Getting Started
Let’s start studying…
First, let’s start by downloading the plugin. There are 3 ways to get the Plugin,
The first one is to install via Android Studio market,
The second is to download and install the plugin directly from Huawei’s site,
Finally, compile it by obtaining the source code via github.
Installing on Android Studio:
In Android Studio -> File -> Settings -> Plugins, we search by typing “HMS Core Toolkit” in the search bar:
When we restart Android Studio after installing the plugin, we see that the “HMS” tab is coming.
Getting on Huawei Official Site:
From this address, we go to the HMS Core Toolkit page and say “download now”. I recommend downloading the most current version among:
After the download is complete,
Android Studio -> File -> Settings -> Plugins
Just select “Install plugin from Disk” section and show the location where you downloaded HMS Toolkit:
After the plugin is installed, the “HMS” tab should have appeared on the top:
Also, if you want to see the source code of the plugin and customize it for yourself, you can look at the details on the Github page, or you can compile and use it yourself.
After downloading the plugin, you need to login to your Developer account to start using it:
When you see this page after logging in, you can start using the plugin:
You can follow step by step how to create an application from scratch thanks to this panel, which was created with the HMS ecosystem, which has just been introduced and decided to develop applications:
this section, which allows you to select the kits you want to use in your application and integrate them into your application, simply select from the interface.
For example, after selecting “Account Kit” and apply, it can automatically see the necessary additions to the gradle file of the HMS Core resources at the project level added with build.gradle:
This feature, which contains details on how you can integrate and start using the kits you want to integrate in your application, you can integrate the kits without the need for documentation in your project.
Also, thanks to the “Scenario Description” tab in the last step, you can learn how to use many features in the commonly used related kit and how to integrate them into your application interactively.
With drag and drop feature, it is possible to transfer samples directly into the code:
Cloud debugging is another feature provided by HMS Core Toolkit to test our applications on the device during the development process, we can test your application in pure-HMS devices in real time.
We have the opportunity to make 4 different tests of the applications we write automatically. These types are:
- Compatibility Test
- Stability Test
- Performance Test
- Consumption Test
After the test is completed, you can view the results and details using the results button next to it.
In fact, thanks to this feature of HMS Core Toolkit, which is the main purpose of development, it is possible to automatically detect GMS dependencies for many kits and turn them into a structure that you can use either directly to HMS services or to both HMS and GMS.
Here you may have to wait a bit depending on the size of your project:
we have 3 options:
- Add HMS API (HMS API First): if there is both GMS and HMS on the device where the application is installed, a structure that will prefer HMS will be installed first.
- Add HMS API (GMS API First): If there is both GMS and HMS on the device where the application is installed, a structure that will be preferred GMS will be established first.
- To HMS API: If you choose this option, all GMS dependencies in your application will be removed and HMS kits and services will be integrated instead.
If you are not sure which service you choose, you can get more detailed information from this link.
The part of the code that can automatically convert comes as unchecked next to you to check it, showing you as follows, it is applied automatically when you give your confirmation after checking:
Some parts are not suitable for automatic conversion, so you are asked to check and convert them manually:
In order to see the automatic changes made by the plugin, double clicking on the relevant line presents you the changes it made in a new window in comparison:
If something goes wrong in your project and you want to go back to the previous version, all you have to do is select the “restore project” from the panel to show the location where you backed up:
Thanks to all these features, the fact that all documents and codes we need for HMS integration can be provided through a plug-in while developing is one of the factors that increase comfort during development.
For questions and problems, you can reach us via firstname.lastname@example.org or Huawei developer forum.
Hope to see you in my next post 🙂