Huawei Ability Gallery - App Ability

Serkan Mutlu
Huawei Developers
Published in
7 min readAug 4, 2020

What is Huawei Ability Gallery (HAG)?

Huawei Ability Gallery is a core capability of the HMS Core ecosystem. HAG creates more convenient experience for users and enables more efficient service distribution for developers, achieving a win-win-win situation for users, developers, and Huawei.

What are HAG Abilities?

Abilities link user intent with various service offerings. Developers define abilities in Huawei Ability Gallery, and users can use these abilities on Huawei devices or through other traffic entries.

HAG provides developers three abilities type

App Abilities: App abilities are presented by icon, and developers must provide deep links to the associated apps.

Card Ability: Developers use quick app development technology to develop ability cards (including data processing and display logic), and abilities are displayed as cards. Information can be displayed in card mode.

Content Ability: Huawei Ability Gallery obtains data from developers’ servers through APIs and provides content abilities for Huawei products. Huawei products then present the abilities as defined. Content abilities can be presented by card or voice.

What is App Ability?

App Abilities which are represented by an icon are used to redirect user to application. We can use app Ability with APK and RPK. All app abilities are shown at Instant Access panel inside Huawei Assistant page.

Note : You have to enable Huawei Assistant today to use Assistant Page

We need to open Huawei assistant page to use it. You should follow this way to change state of it : Settings -> Home Screen & Wallpapper ->Home screen settings -> Huawei Assistant today . Huawei Assistant today must be enabled to use related page.After this you can reach related page.

First of all you should open first page of Device and then you should try to change screen left to right.If Page opens , Your settings is correct .Unless Page open , You need to check Huawei Assistant Today setting.

Huawei Assistant consist of Global search,Instant access and Smart care panels
  • Global Search : We can use it to search something .
  • Instant Access : Users click the icon or banner and redirect to APP/Quick App.
  • Smart care : there are smart cards recommended by the system to serve the users.Cards and contents abilities are displayed at here.

App abilities can be created as Dynamic or Static ;

  • Static app abilities are represented by an icon and it redirects user to related app.

Note : If related app is Native application(APK) , App must be installed to use app abilities . If App ability is created for Quick app (RPK) , users don’t need to install app firstly.

After Released app ability , we can see at there
  • Dynamic app ability can be used to send parameter to application via HiVoice. For example , When the users want to open an application using specific parameter like Hotel name,book name,music name, etc. Dynamic App abilities can be used .They just need to define parameters inside redirect parameters .You can define many parameters inside there.
Sending Data

Also We can trigger our app using app keyword with HiVoice . If your app ability supports multi languages , You can define many keywords for different anguage.

Note : Maximum of 10 keywords can be configured for each language.

App Keyword Setting

Note : HiVoice uses Celia.currently Celia is available in P40 and following languages and regions:
Languages: English (UK), French (France), Spanish (Spain)
Countries / Regions: United Kingdom, France, Spain, Chile, Mexico, Colombia
Detail : You can follow link to get more information for Celia : Link

How can we create an app Ability?

Note : If you want to create ability , you need to have Entertainment Account .You can create app ability inside 1 or 2 days.

While we create an app ability , We must follow specific way.

  • Firstly, app ability’s icon should be designed. Design operation has many restriction like size , color , icon border type ,etc.
    If you need to get more information , you will follow this link (Icon Design Rules).
  • We need to create deeplink to redirect users.Redirection URL in a deep link,
    Under this line you can see correct formats for Both APK and RPK solution:
    huawei://
    com.huawei://
    com.huawei://hag
    com.huawei://hag/app/ability
    com.huawei://hag/ability?type=app&test=1

Note : RPK and APK have different deeplink integrations.

If you want to create deeplink for APK ,you can define them inside activity or Navigation XML files.I want to give an example for it :

Basic example of deep link

On the other hand You want to create deeplinks to Quick app , You should define them inside manifest file of Quick App.We must add path parameter under router tag .

router section of Quick App Manifest File

After add path parameter under Router , You can define deeplink like : hwfastapp://appPackageName

How can we test deeplinks ?

We can test deep-links with adb . If There is no problem on deeplink, Your Application is opened . You can use CMD to work with ADB commands .Also following code helps you for testing deep-link

adb shell am start -a android.intent.action.VIEW -d deepLink

Examples Of Adb Commands :

adb shell am start -a android.intent.action.VIEW -d pettracker://pet-tracker.fi/home

Note : pettracker://pet-tracker.fi/home is our deeplink , It redirects user to related screen.

If you want to send parameter with app ability, you can use following deeplink

adb shell am start -a android.intent.action.VIEW -d pettracker://pet-tracker.fi/track?param=Buddy

  • After These operations are finished , We can start integration for related app.
  • While We begin to create app ability , we have to select countries/regions for release the ability.There are three region Europe,Russia and AALA(Asia-Africa-Latin America).

Note : If your ability needs to serve two countries or regions covered by different sites, create it on both sites. For example, if you want to server both Morocco and France, create an ability on Huawei Ability Gallery (AALA) and Huawei Ability Gallery (Europe).

  • After selecting a site, you will be prompted to sign the Huawei Ability Gallery Service Agreement.Click App ability, set required parameters, and click Create.(Ability Name has to contain app name .For example your App name Pet Tracker , your app Ability name can be Pet Tracker Ability)
  • Select countries/regions for release.You can also create an ability for each operations region independently.
  • We must configure an interaction model.Interaction model page includes ability name ,ability category and ability trigger mode.Under this page you determine trigger mode . For example keyword trigger mode. User can search your app in HiSearch on Huawei assistant page .If your user’s intent matches declared keyword your app ability displayed on screen.
Panel is only used for search panel
  • We can configure a deep link that redirects a user from an ability icon to an app on Lint settings page. The deep link can be created for APK or RPK .
  • Finally Click Ability information page. Fill in basic information and ability display information, and click Save. If Ability information supports multi-language presentation, you can click Manage Languages to select and manage languages, and configure the relevant Ability information.

How can we test created App ability ?

Huawei provides us test platform for App abilities.Before releasing an app ability, test its functions and content and make sure that all of them pass the test.

Sign in to Huawei Ability Gallery, go to Test > Release for test, and click Release for test.

We need QR code to test app abilities for this reason click Simulation test to obtain a test QR code. The test QR code is displayed on the right.

After Creating QR code , we can scan it with Our Device.We can do this operation using Huawei Ability test tool. Start Huawei Ability test tool select App Ability, and tap Scan QR Code, and scan the QR code then click search.

After the scanning is successful, set Intent category and Keyword, tap SEARCH, and test the functions and content.

Test Operation

Related Links

HAG Web Page : Link

App Ability Web Page : Link

App Ability Configuration Page : Link

App Ability Design Page : Link

--

--