Huawei Share Kit Facilitates to Acquire Skill in Enforcement - Part 1

107 posts
Thanks Meter: 10
By Freemind R, Official Huawei Rep on 18th June 2020, 04:30 AM
Post Reply Email Thread
More articles like this, you can visit HUAWEI Developer Forum and Medium.

In this article, we will learn how to implement Huawei Share Kit in the android project.

Huawei Share Kit provides an easy interface to use so that it can share images, videos, and docs, etc. It delivers stable file transfer speeds that can exceed 80 Mbps if the third-party device and environment allow.


1. As a cross-device file transfer solution, Huawei Share uses Bluetooth to discover nearby devices and authenticate connections, then sets up peer-to-peer Wi-Fi channels, so as to allow file transfers between phones, PCs, and other devices.

2. To ensure user experience, Huawei Share uses reliable core technologies in each phase of file transfer.

Devices are detected using in-house bidirectional device discovery technology, without sacrificing the battery or security

Connection authentication using in-house developed password-authenticated key exchange (PAKE) technology

File transfer using high-speed point-to-point transmission technologies, including Huawei-developed channel capability negotiation and actual channel adjustment

Let’s see the working principles:

Integration part:

Huawei Share kit provides two types of implementation in which first implement depend on Huawei (Sender) to Huawei (Receiver) devices.

The second type of implementation which is based on the Android device (Sender) to Huawei device (Receiver).

In this article, we will implement the second type of implementation which is not available on any documentation or code lab.

But the first type of implementation is already provided in Huawei code lab with sample code.

What You Will Need?

Hardware Requirements

A computer (desktop or laptop) that runs Windows 7 or Windows 10

A Huawei phone (with the USB cable), which is used for debugging

A third-party Android device, which is used for debugging

Software Requirements

JDK 1.8 or later

Android API (level 26 or higher)

EMUI 10.0 or later

Let’s create a Sample Demo:

1. Create an Android Studio project:

2. Enter the file name and project location and click Finish:

3. Add Share SDK in the project:

4. We need to add the code repository to the project root directory gradle.

maven {
     url ''
5. We need to add the following dependencies in our app gradle.

dependencies {
        implementation files('libs/sharekit-')
        implementation ''
        implementation ''
        implementation ''
        implementation ''
Note: You need to raise a ticket to get Share Kit SDK “sharekit-1.0.300.aar” file

Click on the below link and raise your ticket.

6. We need to add two permission to our android project.

7. Click Sync now or Sync Project with Gradle Files to build a project.

We will cover code implementation in the next part of this article.

For your information, I will show you the final output of this sample.

Android device (Sender):

Huawei device (Receiver):

If you have any doubts or queries. Please leave your valuable comment in the comment and ask your question in HUAWEI Developer Forum.
Post Reply Subscribe to Thread

huawei share kit

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes