Huawei Ability Gallery Content Ability - Huawei Developers

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Hello everyone, In this article, we will be exploring how to develop content ability . Also I will share an example We developed before.
Note I: If you want to develop any ability, you need to have an enterprise account otherwise You can reach relevant panel on Huawei console.
Note II: Everyone in team account can’t use same enterprise account to develop ability.
What is Content Ability ?
Content ability looks like card but There are a few differences between card ability and content ability. Following image shows us How it looks like. Main differences will be explained next steps.
​What are the differences between Content and Card Ability ?​Content Ability
Developers only provide an API which includes information about design and data which will be displayed on Content body. This API is used to be generated content view by HAG server.
Developers can’t design card template using HTML,CSS and JS for content ability because Content ability design information consists of JSON format. They just select an predefined design template and use it in API response message.
Developers should use schema definition provided by Huawei.
Nowadays HAG provides a few types of card templates but These are enough to meet for CP requirements.
Developers can deploy content ability in short time with only developing an API.
When Users click some thing on Content ability , They can be redirected to Native App, Quick App or Web Page using deeplink
Card Ability
For Card ability There many way to develop card. Developers can design as they wish or they can use predefined template Also They can modify predefined card template. I think that last option is good alternative for designing from beginning to end. Because Card ability has many design restrictions for much information you can visit following page: Link.
They can develop special card design using HTML,CSS and JS.
Developers have to use Huawei Quick App IDE to design card ability and They need to use a few application to display card ability. You can find all required app for Card and Quick App solution : Link.
Card abilities are developed using HTML,CSS and JavaScript so These platforms provide us many feature to use with Card ability.
Many of JavaScript features can be used with Quick App like Fetch API.
Developers can obtain data from server and show data on body of card.
When Users click some thing on Card ability , They can be redirected to Native App, Quick App or Web Page using deeplink.
Content Ability’s Working Principle​HUAWEI Ability Gallery gets service data from developers’ server and generates smart card to end users.
Users can reach content ability via touch points Which Huawei provides us. Nowadays There are 4 touch point AI Voice, AI Lens, AI Search, Smart Services.
After Users send intent using any one of touch point , HAG server gets following request and send data request to Developers’ server via API which was provided by developers to obtain content ability design. When HAG obtains response message from developers’ server with successfully, It generate a content and then present it to users with data.
Following image describes Working principle of Content Ability.
Let start to develop a content ability step by step​I will explain how to develop content ability using general content template but There are many content templates.
First of All we need to create an Ability and determine its category and then you should fill following page for Ability Basic information, Country/ Region and Display information.
Basic information page includes ability information.
Select release countries / regions. Select countries or regions where the ability is to be released.
Display information consist of ability display information like icon, name, description, etc.
After that We can set content ability design , service and API which was provided by developers to generate content .
I want to explain important sections of fulfillment page as shortly.
Type : describes ability type. There are three ability type Web Service, Custom Card and RPK/APK and H5 link. We need to select Web service type for content ability.
Distributable ability capabilities : Developers should select capabilities which will provide in Content ability. For example Content ability will include image and text on body, they need to select Provide texts and images option.
Personal data authorization: Section can provide us user specials information like user location, Voice texts or photos of a user.
Service Links : The links (required only for mobile phones/tablets) are configured for the Go to service function (tap the three-dot icon button on the top of the card and then tap Go to service), which are different from those to be redirected when a card is tapped.
Web service card instance: After a card instance is configured, it will be displayed as the GUI effect when the user triggers the service intent. HAG only supports API data source to generate content ability design.
Before develop API, Developers need to prepare Content ability design template using this template. After click set button, content ability’s design page will be opened and developers can choose best design option for their project.
General Templates shows that Content ability predefined templates. Developers just select one of the template from there.
Attribute Panel, After select a content template, Developers can change something on content ability body item like text, button, Image size from this section.
After any item’s modification is finished on content ability, JSON file is generated automatically. JSON file is important because Developers use it in response message of API so When design operation is finished, It should be saved and downloaded. Following image shows us content design as JSON format. This is called Schema Definition. You can visit following link for detail information : Link
Code:
{
"version": "1.0",
"errorCode": "",
"errorMessage": "",
"sessionAttributes": "",
"reply": {
"isEndSession": true,
"displayText": "",
"speech": {
"type": "",
"text": "",
"ssml": ""
},
"commands": [
{
"head": {
"name": "DisplayTemplate",
"namespace": "Render"
},
"body": {
"templateType": "BasicImageDetailTemplate",
"generalCardInstance": "contentAbilityDesign",
"templateContent": {
"items": {
"type": "BasicImageDetailTemplate",
"content": {
"primaryInfo": {
"primaryText": {
"text": "Product Name",
"highlightText": [
"",
""
],
"highlightColor": ""
}
},
"imageInfo": {
"imageInfoList": [
{
"scale": "OneToOne",
"url": "Image URL "
}
]
},
"detailUrl": {
"webURL": "",
"deepLink": {
"url": "",
"appPackage": "",
"minVersion": 1
},
"quickApp": {
"url": "",
"minPlatformVersion": 1,
"minVersion": 1
},
"silentLink": {
"url": "",
"appName": "",
"appPackage": "",
"appBrief": "",
"appIconUrl": "",
"channelPackageId": ""
}
},
"auxiliaryInfo": [
{
"auxiliaryText": [
{
"text": "Product Price",
"bulletsUrl": "",
"highlightColor": ""
}
]
}
]
}
},
"buttonLinkArray": [
{
"buttonText": "More Products",
"webURL": "",
"deepLink": {
"url": "",
"appPackage": "",
"minVersion": 1
},
"quickApp": {
"url": "",
"minPlatformVersion": 1,
"minVersion": 1
},
"silentLink": {
"url": "",
"appName": "",
"appPackage": "",
"appBrief": "",
"appIconUrl": "",
"channelPackageId": ""
}
}
]
}
}
}
]
}
}
In JSON file Template content section describe all item in content ability’s body. As you see our example consists of 2 texts, an image and a button. In addition You can set URL to redirect users to specific Native , Quick APP and Web page. If you want to redirect users to App, you should use deeplink. For Web page, You just need to write an URL of Web Page.
​After Download JSON file We can come back to fulfillment page.
Service Deployment : Developers set there with API which was developed before. You can find Backend code at the end of the page for our application.
Following Image figures out Request & Response message also It shows us how we can use content JSON in response message. As you know request and response messages have to be developed on Backend side. You can find example of it following lines.
Note : There are many Schema definitions for different category and develops have to follow their structure to generate content ability.
Intent Declaration for Content Ability​Intents of content abilities are classified into user intents, event intents, and resident intents. At least one of them must be configured.
User Intents : Goals or tasks that users want to achieve, such as taking a taxi and querying the weather. If your user’s intent matches the intent you configure here, HUAWEI Ability Gallery will provide the user with the required ability.
Event intents : Event notifications that you sent to HUAWEI Ability Gallery. When receiving an event, HUAWEI Ability Gallery checks whether the event matches that already configured.
Resident intents : Resident intent cards can be used only in HUAWEI Assistant TODAY. If you need a resident intent card, just create it, with no need to push events. The card will be always available in HUAWEI Assistant TODAY. It is able to redirect users to your ability or recommend content to users, such as popular recipes, Products and hotels.
How can we test Content Ability ?​Developed app can be tested with Huawei Ability test tool ,device test and Interface test options.
If Developers want to test content ability using Huawei Ability test tool, Firstly They need to download it from Huawei App Gallery then they need to generate QR code to test content ability. After generate QR code, Developers can scan it with Huawei Ability Test tool to check if it works or not.
​Also They can test content ability on Real device after create user test list in HAG test page. Following image shows us HAG Test page. Finally Users in the Real-Device Test List can see content on Huawei Assistant Page.
​If Developers don’t have Huawei Device to test, They can use Interface test section and select relevant intent type of content ability to see its view.
Note : Before the test, ensure that the configured intent has been associated with a fulfillment. Otherwise, the test cannot be performed.
​References​Enterprise Account Information : Link
Content Ability Configuration Web Page : Link
Content Ability Design Guide : Link
Fulfillment API :Link
Content Ability Schema Definitions for different Categories : Link
Content Ability Test Guide : Link

Related

(App)(share) .....Explore.... with apk edit...

X-plore
X-plore is dual-pane file manager with tree view, LAN/FTP/Root/Clouds and more.
Highlights:
* Dual-pane tree view
* Root, FTP, SMB, Sqlite, Picasa, Zip, Rar explorer
* Cloud storage access: Google Drive™, Dropbox, SugarSync, Box.net, SkyDrive
* Favorite folders
* Built-in viewers for images, video, audio, text
* Hex viewer
* Fast Image viewer with zoom and slide to previous/next images in folder
* Thumbnails for images and video as well as for various file types (depending on associated application)
* Multi-selection - always available, yet not disturbing
* View APK files as ZIP
* Share - send files by Bluetooth, email, or whatever the device supports, from any location
* Configurable buttons and key shortcuts
* Seamless work with Zip (as if it was normal folder)
X-plore allows you to see inside of your Android phone or tablet.
This is a dual-pane explorer, which means that there're two folders shown at same time, and common operation such as copying files are done from one pane to another.
And X-plore shows folder hierarchy in a tree view. This offers clear orientation on where in file system you currently are, and fast switching to other location.
Currently selected folder and files are highlighed, while other folders/files have slighly darker background.
You may explore internals of the device, and if you're power user and have your device rooted, you can make changes to system data - backup files, remove unwanted applications, etc.
If you're standard user, you may choose to hide internal memory from view and be sure not to mess with system.
You can comfortably see contents of your external memories, either be it built-in high capacity memory, external memory card, or possibly USB memory stick attached to your tablet. All these memory types are listed in main level, you don't need to search for their folders on the device.
Access to FTP and FTPS (secure FTP) servers is supported.
Multiple servers may be configured. All standard file operations can be done on FTP server.
X-plore can display shared folders on other computers in LAN (local area network).
The system allows access to shared folders on computers connected to LAN, or even remote server if it supports SMB protocol.
X-plore can access various web storage "Cloud" servers, and access their files.
You need to have account in supported web service, then you can access your files stored online through X-plore.
Main operations are related to managing files and folders - viewing, copying, moving, deleting, compressing to Zip, extracting, renaming, sharing, and more.
Picasa albums
X-plore can list images in Picasa albums, download them, create albums, upload and delete photos, edit captions.
SQLite database viewer
X-plore can show SQLite database files (those with .db extension) as expandable list of tables, each table containing list of rows and columns with database entries.
Main interaction is done by touch screen, clicking on folders or files to open files, or long-click to open context menu which contains options which can be done on particular clicked item, or multiple selected items.
Multi-selection allows to do operation on more files at once. Files can be selected by clicking check box. It is also possible to select all files in a folder, or clear selection, by clicking parent folder's check box.
Opening file may mean to use one of built-in viewer for most popular file types: images, audio, video and text.
Or you may configure X-plore to use system application for opening files, in which case system-predefined application that can open particular file is launched.
Archives (currently supported are Zip and Rar) are displayed as other folders. You may open them, see contents, and do standard operations that you'd do on files - rename, delete, copy from/to, etc.
Additional interaction is possible by button bar, which is between two panes, and is fully configurable. You may put buttons of your desired operations here, and change ordering.
Google play link
https://play.google.com/store/apps/details?id=com.lonelycatgames.Xplore&hl=en
Good But dont need make thread look like a BOOK
Screen short
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
[\LIST]
Thought it was a game
A dual plane gam
But wasnt
Sent from my GT-S5830 using xda premium
CoolCatGetHome said:
Thought it was a game
A dual plane gam
But wasnt
Sent from my GT-S5830 using xda premium
Click to expand...
Click to collapse
What...game...?
Best filemanager i ever seen.
Gesendet von meinem GT-S5360 mit Tapatalk 2

[Tutorial]How to use Timer Function

You may need a timer......for what????
okay....in this guide i'm showing you to how to switch to the next layout maybe.....
This is not originally a my code.....Just sharing with you
Read Carefully and Realize
1- Start your mono android project
2- Go to your activity, add the following
Code:
using System.Timers;
//This is how my code looked like after adding it,
Code:
[FONT="Arial Black"][B]using System;
using System.Timers;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
namespace Timer
{
[Activity(Label = "Timer", MainLauncher = true, Icon = "@drawable/icon")]
public class Activity1 : Activity
{
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Set our view from the "main" layout resource
SetContentView(Resource.Layout.Main);
}
}
}[/B][/FONT]
3- Now create a another layout
Resources---Layout----Right Click---Add New Item
Choose Android Layout
Name the layout whatever you want. (I named it to Main2)
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
4- Within the brackets after Public Class, add below,
Code:
int count = 1;
System.Timers.Timer timer1;
//for the the timer1, you can replace anything you want to refer your timer
5- After this code ,
Code:
SetContentView(Resource.Layout.Main);
Type this,
Code:
timer1 = new System.Timers.Timer(200);
timer1.Interval = 100;
timer1.Elapsed += new ElapsedEventHandler(OnTimeEvent);
timer1.Enabled = true;
timer1.Start();
6- Now after the code below,
Code:
int count = 1;
System.Timers.Timer t1;
type this,
Code:
private void OnTimeEvent(object source, ElapsedEventArgs e)
{
RunOnUiThread(delegate
{
count++;
if (count == 200)
{
SetContentView(Resource.Layout.Main2);
timer1.Enabled = false;
}
});
}
this code is running in background to whether check if the timer reached to 200 or not, when it reached, then the Main2 layout will load and timer will be disabled.
7- All done now, run it on AVD or your phone. :laugh::laugh::laugh::laugh:
Happy CODING!
Be Creative, be kind, share what you have got
Alternative
If you just wanna go.from one.class to another after a certain amount of time(This is your purpose, i believe). Then instead of.writing such a huge amount of code. You can just make it sleep for 200 millisecond and start an intent.
Like
Code:
sleep(200);
Intent a= new Intent(existing class.this, thenextclass.class);
startActivity(a);
Also if you want you can surround it with a try and catch method.
I think this will do.
And its a class i.e a .java file. Not a layout.
A layout is your .xml file..
I think the point of using a timer was so that program execution wasn't halted and other things would/could continue. If you use sleep then it blocks the thread and no further execution takes place till it continues
Just out of curiosity, ScatteredHell, why would you not just set the interval to 20,000 (20 seconds)? I don't see any benefit to the counter method you've used.
That is the point you see...
You should add all the codes before your timer thread.
then,
Code:
try{sleep(200)}
catch(InterruptedException a){
a.printStackTrace()}
finally{
your intent
}
surrounded by a thread ofcourse
Sent from my GT-S6102 using xda app-developers app
@hiphop
you saying in JAVA, maybe there are few other ways to do that. Man in XAMARIN android layout is not a xml file.....use this before talking
layout is .axml and activity is .cs
this is for C# man
@Archer
I didn't have any purpose, I only wanted to tell this to starters....So that's
Users must be creative to use this
As far as i know.
xamarin is for ios.
(correct me, if i am wrong)..
And sorry, i forgot that you were talking about c#
Sent from my GT-S6102 using xda app-developers app
hiphop12ism said:
That is the point you see...
You should add all the codes before your timer thread.
then,
Code:
try{sleep(200)}
catch(InterruptedException a){
a.printStackTrace()}
finally{
your intent
}
surrounded by a thread ofcourse
Sent from my GT-S6102 using xda app-developers app
Click to expand...
Click to collapse
You should definitely use a timer to wait, not sleep. If you use sleep then it will block the thread it's in, unless you put it in a separate thread and have a callback function for when it's complete. That's exactly the point of using a timer. You create the timer and assign a callback function to execute once the timer triggers. The UI will continue to work during that time. No separate thread needed.
hiphop12ism said:
As far as i know.
xamarin is for ios.
(correct me, if i am wrong)..
And sorry, i forgot that you were talking about c#
Sent from my GT-S6102 using xda app-developers app
Click to expand...
Click to collapse
U wrong man
, It's for iOS and Android both
t1
Hello.
Where did you use the t1 again, or the count in the OnCreate Bundle?
I want to use the timer to fil a progressbar, but I don't know where should I declare the variables.
Like this:
HTML:
ProgressBar progBar = FindViewById<ProgressBar> (Resource.Id.progressBar1);
P.S. :
Ohh and I forgot to mention that, but my application is closing after I launch it.
CCM_Creater said:
Hello.
Where did you use the t1 again, or the count in the OnCreate Bundle?
I want to use the timer to fil a progressbar, but I don't know where should I declare the variables.
Like this:
HTML:
ProgressBar progBar = FindViewById<ProgressBar> (Resource.Id.progressBar1);
P.S. :
Ohh and I forgot to mention that, but my application is closing after I launch it.
Click to expand...
Click to collapse
Sorry for the late reply. I use count inside of Activity 1 otherwise you cannot use it if you declared it in OnCreateBundle. I didn't play with xamarin in a long time, so sorry I don't remember. But i'm pretty sure you can find it in examples.
Go to project properties. There are 2 options. I exactly don't remember their title, when you tick those two options. app will run without the need of xamarin runtime on your phone. When you normally debug the app, runtime is automatically installed in your device, so it won't take long to debug as only app contain the code.

Don't Let App Signature Problems Hold You Back

Common Problems
As a developer, you may have encountered situations when your app is rejected due to app signature problems, for example:
1. Your app signature is different from that of the app version already available for sale.
2. Your app signature is inconsistent with that configured in AppGallery Connect, that it does not support third-party sign-in or payment.
3. When using HMS Core services, your app fails to send push messages or cannot load a map due to inconsistent certificate fingerprints.
4. After release, your app cannot be updated on different platforms due to inconsistent app signatures.
There could be more.
You may wonder why your app is always rejected during app review, while the app signature is consistent and no problems occur during your local testing. In these cases, your app may be re-signed by the App Signing service of HUAWEI AppGallery Connect.
What Is an App Signature?
Before dealing with the problems, let's see what an app signature is.
Remember two points:
1. App signatures are important. Your app cannot be released without one.
2. App signatures cannot be changed. Otherwise, your app will be in a mess - its certificate fingerprint changes, its authentication information changes, app update fails, and many other problems occur.
We usually use Android Studio or run commands to sign an app.
What Is AppGallery Connect App Signing?
What AppGallery Connect App Signing has to do with it? Well, it provides another way for you to sign your app.
Now there are two options for you:
The first one is that AppGallery Connect generates a new signature for your app. The new signature is unique, and you need to keep using it since then.
Select Let AppGallery Connect to create and manage my app signature key in AppGallery Connect to use this method.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
However, you can only use this method for new app release. As I said, AppGallery Connect generates a new signature. This method does not work if you already have a released app version, which already has an app signature.
So, the second way is to upload a signature file. In this case, AppGallery Connect only signs your app using the file you uploaded. No matter what signature file you upload, AppGallery Connect will keep it safe and sound. Select Export and upload the key and certificate in AppGallery Connect to use this method.
Use a tool or commands to generate a ZIP signature file, upload the file to AppGallery Connect, and let AppGallery Connect sign your app. Make sure you upload the same signature file as that of your released app version. Otherwise, the signatures will be inconsistent.
But don't worry, AppGallery Connect now supports verification of app signature files. If you upload an inconsistent signature file, AppGallery Connect will display a message, indicating that the file cannot be uploaded.
Here's an example. You have signed an app using Android Studio. Assume that its app signature is A. Then you use App Signing to generate a new signature B. The final signature of this app will be B, which is different from A.
However, if you upload a ZIP file that is generated using signature A, the signature will remain unchanged during app review and release. In a word, you decide your app signature.
How Do We Decide Which Way to Use?
We don't want to face problems. So how can we choose the right way? It's simple.
If you wish to release an app only on HUAWEI AppGallery, you can let AppGallery Connect generate an app signature for you. If you wish to release the app on multiple platforms and keep the signature file consistent, or if you need to use the existing signature for authentication, just upload a file.
If you have released an app on AppGallery, you can only upload a file containing the same signature as that of the released version.
Now, we can see that the problems mentioned before are caused by an incorrect app signature. Perhaps you chose the wrong way to sign your app, or uploaded a wrong signature file. Unfortunately, an app signature cannot be deleted once it has been applied. The current solution is to delete the app, create it again, and then choose the right way.
PS:
1. App signature is not equivalent to App Signing. A signature is mandatory, while you can choose whether to use the App Signing service.
2. App Signing is optional for an APK package, but mandatory for an AAB package.
3. If an app signature changes, the corresponding certificate fingerprint also changes. In this case, you need to configure a new certificate fingerprint for related services.
For more details, check:
AppGallery Connect App Signing documentation:
https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-app_bundle

Why Should We Use the App Bundle? Release App Bundle on AppGallery

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
When we want to release Android projects, there are two distribution options.
generate app bundle or generate signed apk.
Although it is the app bundle that comes selected, most of us have to make an extra click and use the first usual method the generate signed apk. This method may seem more reasonable to share the app with a small pool of users without distributing it to any store.
But if your application appeals to large audiences in the store, using app bundle becomes more and more inevitable. So what is the app bundle and what is the difference?
Let’s take a look at these now
Faster installation, Less disk space!
APP Bundle
The apk file contains all the files and codes of the project. It has a certificate stating that it is signed. If we are distributing to the market with the .apk file, this certificate is very critical. This certificate must be retained for implementation purposes (eg update).
An apk file collects the project’s available resources (audio, video, photo, mandatory data) in one package. It does not accommodate Dynamic Features or Assets device group specific.
Reduced APK Size
When you publish your applications using application packages, you can reduce the size of your application, simplify versions, and enable advanced distribution features.
Application packages use a publishing model called Dynamic Delivery to create and publish APKs optimized for each device configuration.
Thus, it offers users more efficient applications.
This way, you only need to create, sign and upload a single build to support APKs optimized for a wide variety of device configurations.
So, can we use the app bundle on AppGallery?
Yes, you can distribute your application with the app bundle in the AppGallery, and you can move your existing apk to the app bundle.
Let’s see how to do this.
Publishing App Bundle in AppGallery
To release our project as app bundle on AppGallery, we must first create the app signing file on the AppGallery console.
AppGallery Connect provides you with two signature creation methods:
1. Let AppGallery Connect to create and manage my app signature key (recommended);
2. Export and upload the key and certificate. The first one is recommended. If it is unavailable, use the second method. Note that,
usepepk.jarfound over the Internet instead offrom Android Studio to export and upload the key and certificate.
In this article, I will add an app signing file using the method suggested in the first item.
If you want to add as in the 2nd way, I recommend you to read the following article
https://medium.com/huawei-developers/guide-of-create-app-signature-file-c3bcb1f3b5bd
For generate signed bundle continue
If you already have a keystore file you can continue with that. If you don’t have you should create a new
Choose your variant and generate your signed bundle
After generating the signed app bundle, we click on 1 to access the aab file, and 2 to access the exported key file. Click on the area specified in 2 and go to the file location where our private key was created. Open power shell in here and run the command below.
Code:
$ keytool -export -rfc -keystore upload-keystore.jks -alias upload -file upload_certificate.pem
Notarameters must be replaced as needed.
Click on browse and add the upload certificate and click to submit button.
Our application signature certificate is ready now, we can go to version control and add our app bundle and release it. If the signature key uploaded to AppGallery Connect is different from that of the released app, the new certificate fingerprint may be different from that generated locally during app development. If the services you are integrating need to depend on the SHA-256 certificate fingerprint, you need to add the new SHA-256 certificate fingerprint for your app.
For the release our bundle go to version information section
And add your generated signed . aab file to here. To find the bundle file, you can click the link indicated with 1 above and access the .aab file.
Final
Now you can publish your application as an app bundle. In this way, you can reduce the update sizes of your existing applications and provide a better experience to the end user.
It is very tempting for developers to repeatedly delete and install the entire package after each development.
I hope this article will be useful to developers who want to use app bundle and want to publish their app as app bundle in AppGallery.
Thank you for reading!
Resources
https://developer.huawei.com/consum...pGallery-connect-Guides/agc-appsigning-newapp
https://developer.huawei.com/consumer/en/doc/distribution/app/18527283
How do I change the signature key or upload key managed in AppGallery Connect?
Interesting method.

Coding-free Integration of AppGallery Connect Cloud Hosting into an Android App

When it comes to building a website, it’s always a hassle having to apply for a domain name, set up a website server, manage certificates, and perform other O&M operations.
HUAWEI AppGallery Connect provides easy-to-use app deployment capabilities, so that tedious tasks such as domain name application and page distribution are automatically performed for you, allowing you to focus on more important things, such as designing your app’s UI, UX, and service logic.
This post will show you how to use AppGallery Connect Cloud Hosting with an example of domain name hosting.
1. Enabling Cloud Hosting
Cloud Hosting is currently still in beta testing. To use the service, you’ll first need to send an application by email. Here’s the official documentation about enabling the service.
Once you’ve obtained the permission to use the service, sign in to AppGallery Connect, go to My projects, click your project, and go to Build > Cloud Hosting on the left.
On the Cloud Hosting page, click Enable now.
2. Creating a Site
A site is similar to a domain name. When you create a site, you’re also creating a domain name.
According to government regulations, each site in the Chinese mainland must have its own domain name. But sites outside the Chinese mainland can share the same domain name, as long as the name is unique.
2.1 Creating a Site in the Chinese Mainland​If the data storage location of your app is the China site, Cloud Hosting can only be used to host your custom domain names. The documentation illustrates the detailed requirements.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
1. On the Site management tab page, click New site, enter a domain name, and click Next.
2. A dialog box is displayed to verify the ownership of your domain name,
as shown in the following figure.
1. In the dialog box, copy the value on the right.
2. Go back to the DNS console of the domain name provider. I’ll use HUAWEI CLOUD as an example. Go to Domain & Website > Domain Name Service > DNS Resolution > Private Zones, click your domain name, and click Add Record Set in the upper right corner.
3. Complete the domain name, set Type to TXT, and paste the copied value in the Value text box.
4. Click OK, go back to AppGallery Connect, and click Next.
3. If the verification is successful, the system will configure the CDN acceleration and SSL certificate for the domain name. This may take a while.
4. Configure the CNAME value in the same way. On your DNS console, set Type to CNAME — Map one domain to another.
2.2 Creating a Site Outside the Chinese Mainland​It is much easier to create a site outside the China site. For example, to create a site in Singapore, just click New site and enter a unique domain name, as shown in the following figure.
3. Managing Versions
1. On the Site management page, click Manage version in the Operation column of the site your just created.
2. Click New version. On the page that is displayed, click Browse and upload a compressed web page package you have developed.
3. Please remember that the HTML file must be in the root directory of the compressed package you upload. Also, as shown in the following example, the access entry or the default home page of your website must be named index.html.
4. If this message is displayed, the upload is successful. Now, click OK.
4. Releasing a Version
After you successfully upload a version, wait for 1 to 2 minutes and click Refresh. If the version status changes to Released, the version is successfully released.
Here’s a link to my website which uses Cloud Hosting: Github
https://station-test1012.dra.agchosting.link/
5. Summary and References
With Cloud Hosting, you can host a static page by just performing a few simple configurations on the console.
Here’s the website file I used in this example.
HUAWEI AppGallery Connect Cloud Hosting documentation:
https://developer.huawei.com/consum...-connect-Guides/agc-cloudhosting-introduction
Looks promising
Does it support India?
Basavaraj.navi said:
Does it support India?
Click to expand...
Click to collapse
Yes. of course you can. you only need to select the domain of singapore when you creating a site outside china.
Nameless Foe said:
Looks promising
Click to expand...
Click to collapse
Thank you for liking. i will more useful post about AppGallery Connect.

Categories

Resources