HUAWEI HiAI is an open artificial intelligence (AI) capability platform for smart devices, which adopts a "chip-device-cloud" architecture, opening up chip, app, and service capabilities for a fully intelligent ecosystem. This assists developers in delivering an optimal smart app experience for users, by fully leveraging Huawei's powerful AI processing capabilities.

In order to open up app capabilities, HUAWEI HiAI Engine provides a wide range of AI capabilities that can be integrated into apps. Image super-resolution, one such AI capability, empowers apps to:

For more information, please visit our official website at the following URL:

What You Will Create

In this codelab, you can use this AI capability to create an Android app that makes blurred images clearer.
For example:
The following is a low resolution image.

After being processed by the app, the image quality and resolution are significantly improved.

What You Will Learn

What You Will Need

Hardware Requirements

A computer (desktop or laptop)
A Huawei mobile phone with Kirin 970 or later as its chipset, and EMUI 8.1.0 or later as its operating system

Software Requirements

Java JDK installation package
Android Studio 3.1 or later
Android SDK package
HiAI SDK package

Step 1: Install

Click the File -> "Settings" -> "Plugins" -> "Browse repositories..."

Enter "DevEco IDE" to search for the plugin and install it.

Step 2: Restart Android Studio

Click "Restart"

Step 1: Import the project from official site.

Download via the link below:


Step 2: Open up the ImageSuperActivity in the project

Step 1: Open the Kit Assistant

Click "DevEco" -> "EMUI Kit" -> "Kit Assistant"

Step 2: Click Image Super-Resolution to enter the detail page

Step 3: Drag the code to the project

Drag the code block 1.Initialization to the project initHiai(){ } method

Drag code block 2.API call to the project setHiAi (){ } method

Click "run" in Android Studio and select your device as deployment target. Finally, click "ok" to start the sample application. See as follows:

Code copied