[Huawei Developers] Freemind R:
Using HMS Core Toolkit - Cloud Debugging Real Devices & Emulators on Android Studio

More information like this, you can visit HUAWEI Developer Forum​

Original link: https://forums.developer.huawei.com/forumPortal/en/topicview?tid=0201331664626840002&fid=0101246461018590361

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/000/584/0890966000000000584.20200818204301.39014114001822329896818731452438:50510904015826:2800:E5DD1F1EA7C8CB0C7A38162467A42E04E33973BEA6C04785221AB5E1472583D5.jpg"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/000/584/0890966000000000584.20200818204301.39014114001822329896818731452438:50510904015826:2800:E5DD1F1EA7C8CB0C7A38162467A42E04E33973BEA6C04785221AB5E1472583D5.jpg[/IMG]​

Article Introduction

In this article we will install HMS Core toolkit plugin on Android Studio and use cloud debugging feature to debug android applications on Huawei Real Devices & Emulators from Android Studio.

Cloud Debugging Introduction

HMS Core Toolkit provides Cloud Debugging for you to perform 24/7 uninterrupted testing on your app running on remote real devices and emulators, covering massive Huawei's latest and hottest models. With this function, you can learn about the running status of apps on Huawei devices anytime and anywhere even if no device is available, device types are not completed, or an error cannot be reproduced, helping you build a better app for users.

Cloud Debugging Notes

Huawei Cloud Debugging can be used on a single device for 2 hours each time. Before the validity period expires, you can release the device and apply for the device again. When you use Cloud Debugging for the first time, a 24-hour duration will be allocated to you. When the duration expires, the system will automatically remind you whether to renew the duration. You can renew 8 hours at a time. To use Cloud Debugging, you need to sign in using the Huawei account, complete identity verification, and then authorize the sign-in.

Install HMS Core Toolkit

To install HMS Core Toolkit in Android Studio, we need to do following steps:

Step 1:

Open setting by clicking File -> Settings (Alt+Ctrl+S)

Step 2:

Click Plugin which you find in left tab.

Search “HMS Core Toolkit” in search box under marketplace.

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/000/584/0890966000000000584.20200818204352.39844174119821057277191285318533:50510904015826:2800:4B1436A480A3E884C00CB7606207B3F9965AAD397BFFA1B80F336C65C263CABD.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/000/584/0890966000000000584.20200818204352.39844174119821057277191285318533:50510904015826:2800:4B1436A480A3E884C00CB7606207B3F9965AAD397BFFA1B80F336C65C263CABD.png[/IMG]

Step 3:

Install the plugin, which requires to restart the Android Studio once.

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/000/584/0890966000000000584.20200818204406.31963603859225730291338341983084:50510904015826:2800:EA6A5C98BBA1C7CBE043231B9F43A54B4F1E68C472577634B4E2096928CE4D17.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/000/584/0890966000000000584.20200818204406.31963603859225730291338341983084:50510904015826:2800:EA6A5C98BBA1C7CBE043231B9F43A54B4F1E68C472577634B4E2096928CE4D17.png[/IMG]

Cloud Debugging

To debug applications in Android Studio for Huawei Real Devices & Emulators, we need to do following steps:

Step 1:

Go to HMS > Cloud Debugging or click the icon shown in the following figure.

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/000/584/0890966000000000584.20200818204433.77404363933535557226023329385352:50510904024839:2800:BF19CB2025906E7EB2C2176A150A6DCD0E15FAAFBC36CCCA04E801FF8E490644.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/000/584/0890966000000000584.20200818204433.77404363933535557226023329385352:50510904024839:2800:BF19CB2025906E7EB2C2176A150A6DCD0E15FAAFBC36CCCA04E801FF8E490644.png[/IMG]

Step 2:

You need to sign in using the Huawei account in order to access cloud debugging.

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/000/584/0890966000000000584.20200818204444.31990600796678235303642013043405:50510904015826:2800:F08A4C1C6566C16B1DBFA1AD69E8B8CCF2965050A049CE05773E2663FB81AA5C.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/000/584/0890966000000000584.20200818204444.31990600796678235303642013043405:50510904015826:2800:F08A4C1C6566C16B1DBFA1AD69E8B8CCF2965050A049CE05773E2663FB81AA5C.png[/IMG]

Step 3:

After login on browser you need to allow “HMS Core Toolkit” to access your HUAWEI ID.

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/000/584/0890966000000000584.20200818204454.90276693731260334862811536503959:50510904015826:2800:A47FD21930C0AC88B36D27B85D1A241BB5ECE4A5F11868D6EF1E74BD6D0A77A1.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/000/584/0890966000000000584.20200818204454.90276693731260334862811536503959:50510904015826:2800:A47FD21930C0AC88B36D27B85D1A241BB5ECE4A5F11868D6EF1E74BD6D0A77A1.png[/IMG]

Step 4:

On the Select Remote Device page, you can select a required device by Resolution, Android Version, EMUI Version, Series, and Others. Alternatively, you can use Available Devices.

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/000/584/0890966000000000584.20200818204506.21461687497866235068972732945216:50510904015826:2800:11A91283277B40BDC6322E9A41DF0EE7D1224B234F9774437F099BF7E34E5D29.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/000/584/0890966000000000584.20200818204506.21461687497866235068972732945216:50510904015826:2800:11A91283277B40BDC6322E9A41DF0EE7D1224B234F9774437F099BF7E34E5D29.png[/IMG]

Step 5:

After selecting the device below figure wi displayed after the device is connected.

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/000/584/0890966000000000584.20200818204556.69589340982421091764940747853271:50510904015826:2800:B4B45D03C4294AD697B67406E731C1A7BC2359F9D0B3A6824AC2F9CEAD630B48.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/000/584/0890966000000000584.20200818204556.69589340982421091764940747853271:50510904015826:2800:B4B45D03C4294AD697B67406E731C1A7BC2359F9D0B3A6824AC2F9CEAD630B48.png[/IMG]

Sidebar Functions:

Functions of the buttons on the sidebar:

Releases the device that is being used. Each real device can be used for 2 hours at a time. If the device is in idle state, release the device so that other developers can use it properly.

Turns off or on the screen.

Sets a device resolution.

Sets a display scale. The default value is 100%.

Manages device tasks.

Returns to the device home screen.

Goes back.

Imports a local file to a device.

Debug Application:

On the menu bar, click or Debug to debug or run the app on the device. You can also run ADB commands to perform operations.

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/000/584/0890966000000000584.20200818204524.90850470634871497799338951810518:50510904015826:2800:43929775B1F521CAC4D36ED229D0F71395D1017184880651BDC53B091C442D94.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/000/584/0890966000000000584.20200818204524.90850470634871497799338951810518:50510904015826:2800:43929775B1F521CAC4D36ED229D0F71395D1017184880651BDC53B091C442D94.png[/IMG]

Checking Logs:

After installing the application on Cloud Debugging device you can check logs. Open logcat to check logs in Android Studio.

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/000/584/0890966000000000584.20200818205036.94342334236784454875539886991681:50510904015826:2800:B8A928B9C9655E67499474018CE08D59AE0B6A282FE92D4D20E9F25BD1CB1C73.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/000/584/0890966000000000584.20200818205036.94342334236784454875539886991681:50510904015826:2800:B8A928B9C9655E67499474018CE08D59AE0B6A282FE92D4D20E9F25BD1CB1C73.png[/IMG]

References:

HMS Core Tool Kit Official Documentation:

https://developer.huawei.com/consumer/en/doc/development/Tools-Guides/overview-0000001050060881

Cloud Debugging Official Documentation:

https://developer.huawei.com/consumer/en/doc/development/Tools-Guides/cloud-debugging-0000001051084360

Conclusion

Huawei HMS Core Toolkit is very helpful for developer while implementing HMS capabilities in android projects. Cloud Debugging is also very helpful for developer to debug applications without having any physical device with him.