Detailed explanation of common jumps and links in Huawei AppGallery

At present, the Huawei AppGallery (hereinafter referred to as AG) has more and more functions and more and more pages. With this, there is an increasing demand for various page jumps.
However, there are more and more types, functions, and usage scenarios of the links provided by Huawei AppGallery. Those who are not familiar with these links will definitely be very heady. Based on my understanding of what I use, I have done some sorting of AppGallery common links and jump scenes, for your reference only.

The introduction of the various links below is mainly divided according to the usage scenarios. If there are errors, please correct me.

1. Jump to the AG homepage

Typical usage scenario: You need to jump from the developer app to the homepage of the app market, allowing users to search for related apps or activities on their own.

Usage: Use the action method of Intent, the specific action is:

action:com.huawei.appmarket.intent.action.MainActivity

Related code examples:

public void launchAGHomePage() {
     Intent intent = new Intent("com.huawei.appmarket.intent.action.MainActivity");
     startActivity(intent);
 }

2. Jump to the AG application details page

2.1 In-app jump through Intent

Typical usage scenario: Pull up in the app to jump to the app details page, and app users perform operations such as rating and commenting.

Usage: Use the action method of Intent, which can be divided into two categories:

1. Through APPID:

action:com.huawei.appmarket.appmarket.intent.action.AppDetail. withid
setPackage("com.huawei.appmarket");
name: “appId”, value: “C100170981”

2. Pass the package name:

action:com.huawei.appmarket.intent.action.AppDetail
setPackage("com.huawei.appmarket");
name: “APP_PACKAGENAME”, value: “com.huawei.browser”

Note: If you use the method 1 that is APPID, than the method of using the package name, there are more appmarket and withid parameters in the action.

Parameter introduction

parameter name Parameter Type Remarks and values
appId String Add the letter C to the APP ID in "My Application -> Application Information" on the AGC page (for example, the APPID of Huawei browser: C100170981)
APP_PACKAGENAME String Application package name, such as the package name of Huawei browser: com.huawei.browser

Related code examples:
// 1. Via APPID:

public void launchAppDetilPage1() {
     Intent intent = new Intent("com.huawei.appmarket.appmarket.intent.action.AppDetail.withid");
     intent.setPackage("com.huawei.appmarket");
     intent.putExtra("appId", "C100170981");
     startActivity(intent);
 }

// 2. Pass the package name "packageName"

public void launchAppDetilPage2() {
     Intent intent = new Intent("com.huawei.appmarket.intent.action.AppDetail");
     intent.setPackage("com.huawei.appmarket");
     intent.putExtra("APP_PACKAGENAME", "com.huawei.browser");
     startActivity(intent);
 }

2.2 Jump through URL

Typical usage scenario: The user directly clicks on the URL to jump to the application details page through the shared URL link and other scenarios.

Specific method: The link address is:

hiapplink://com.huawei.appmarket?appId=yourAppID&channelId=yourChannelId&referrer=yourReferrer

Note: The parts in italics and bold are manually modified variables, and the rest are fixed values.

Parameter introduction

parameter name Parameter Type Remarks and values
yourAppID String Used to locate a specific application, its value is the AppID on your AGC: For example, the Appid of Huawei browser is C100170981
yourChannelId String (Optional) Represents different channels, which can be used to count channel clicks and output reports based on this channel information. For example: HwBrowserSearch
yourReferrer String (Optional) Represents different attribution parameters: such as Keywords

Related code examples:

  1. By APPID
public void launchAppDetilWithURL1() {
     String text1 = "hiapplink://com.huawei.appmarket?appId=C100170981&channelId=HwBrowserSearch&referrer=Keywords";
     Uri uri = Uri.parse(text1);
     Intent intent = new Intent(Intent.ACTION_VIEW, uri);
     startActivity(intent);
 }

3. The market pulls up all local stores and jumps to the details page

Typical usage scenario: Pass in the package name or APPID, pull up all the application stores on the device, and let the user choose the way to open it, that is, guide the user to choose which application market to use. You can jump directly to the details page of the application after you select the application store to open.

How to use: By passing in a link whose scheme is market://, the standard market protocol supported by Android, it can pull up all app stores on Android devices. There are two ways:

1、market://details?id=pkgName   // 支持所有商店
2、appmarket://details?id=pkgName          // 仅支持华为应用商店。
3、market://com.huawei.appmarket.applink?appId=APPID"  // 仅支持华为应用商店。

Note: Method 1 uses market:// to pass in the package name, which is an Android standard method and can be used in all application stores, such as GP, application packages, etc.;.

Parameter introduction

parameter name Parameter Type Remarks and values
APPID String The APPID of the application: For example, Huawei browser: C100170981
pkgName String Application package name, such as Huawei browser: com.huawei.browser

Related code examples:
// 1. Method 1: market:// + package name

public void launchAppDetilOnMarket1() {
     String text1 = "market://details?id=com.huawei.browser";
     Uri uri = Uri.parse(text1);
     Intent intent = new Intent(Intent.ACTION_VIEW, uri);
     startActivity(intent);
 }

// 2. Method 2: appmarket:// + package name

public void launchAppDetilOnMarket2() {
     String text1 = "appmarket://details?id=com.huawei.browser";
     Uri uri = Uri.parse(text1);
     Intent intent = new Intent(Intent.ACTION_VIEW, uri);
     startActivity(intent);
 }

3. Method 3: market:// + Huawei store + APPID

public void launchAppDetilOnMarket3() {
     String text1 = "market://com.huawei.appmarket.applink?appId=C100170981";
     Uri uri = Uri.parse(text1);
     Intent intent = new Intent(Intent.ACTION_VIEW, uri);
     startActivity(intent);
 }

4. Web link to the application details page of web AGC

Typical usage scenarios: scenarios such as the application's official website or web delivery. The user clicks a web link to directly pull up the application details page in the AppGallery to guide the user to install.

Instructions:

Parameter introduction

parameter name Parameter Type Remarks and values
YOUR_APPID String The APPID of the application: For example, Huawei browser: C100170981
pkgName String Application package name, such as Huawei browser: com.huawei.browser
LOCALE String (Optional) Set the country and display language, for example: zh-CN
WAP String (Optional) You can define where you want to share, for example: wap
channeID String (Optional) Sharing source, you can set the channel statistics identifier, that is, the channel number

Example:

// 1、最短链接:通过APPID

https://appgallery.huawei.com/#/app/C100170981

// 2、通过包名

https://appgallery.cloud.huawei.com/appDetail?pkgName=com.huawei.browser

// 3、APPID与包名组合使用

https://appgallery.huawei.com/#/app/C100170981?pkgName=com.huawei.browser

// 4、详细链接并且加上可选参数(不常用,一般在图章中使用)

https://appgallery.cloud.huawei.com/marketshare/app/C100170981?locale=en_US&shareTo=wap&shareFrom=52656

5. The stamp is linked to the application details page of web AGC

The stamp link, in simple terms, is a picture of AppGallery. Click this picture to hyperlink to the application details page of Huawei App Market. Marketers of the application can directly use this image for delivery (the nature of the link is the same as the web link in Method 4 above).

Typical usage scenario: For applications that are on the shelf, marketers hope to use the stamp link to divert to the application store on the official website, or directly use it for delivery.

How to create: On the AGC homepage -> click "Distribute in App" -> "Make a Stamp" on the interface of the in-app distribution, you can make a link to the stamp for the application that has been put on the shelf.

Note: Only the apps that have been put on the shelf can make stamps, and each app can only create one stamp; if the app has already created a stamp, it can only be viewed in "Stamp Query".

Usage Guide: After the
stamp is created, you can view the currently created stamp on the "Stamp Query" tab. You can download the stamp or copy the link in this interface:

Insert picture description here

l Download the stamp: The downloaded result is a png image, which can be hung on the official website or the marketing H5 page.

l New link: used to identify different channels, such as: Facebook, baidu, etc.

l Copy link: different links can be downloaded according to different channels

Example of use:

// 1、典型的链接

https://appgallery.huawei.com/#/app/C100170981?channelId=baidu&referrer=TestBaidu&id=fa09e0f0f3de489386a7180d7b4b3585&s=6E90164FC0CED39CD11D9BE25BE6D1B333FEDCCBCD90A86F29A8DA2400AA4163&detailType=0&v=

// 2、使用典型的图章,在网站中嵌入该图章,点击即可跳转到应用详情下载页,使用实例如下:

Insert picture description here

6. Cross-platform App Linking link

App Linking is a new service launched by Huawei AppGallery Connect. Everyone knows and contacts less, so the following introduction will be more detailed and more popular to help you understand this better

What is AppLinking: App Linking is a link that can be used across platforms (Android, iOS, PC-Browser), and it matches the Firebase Dynamic Link function to help app developers quickly build cross-platform sharing links.

Where is AppLinking used: For example, an application is released on Android and iOS, and there is a promotion activity that requires users of various platforms to participate; the invitation link of the activity must be valid on Android and iOS, and it is valid for PC The user who opened the browser can also browse the corresponding active H5 page.

What are the effects after using AppLinking:

  • The application is already installed on the phone: AppLinking will automatically pull up the application and jump to the specified page,
  • The application is not installed on the phone: The link will prompt you to open it through the application market, which can be configured as Huawei AppGallery or a local application store. After downloading and installing the application, you can still open the specified page.

Insert picture description here

Insert picture description here

Insert picture description here

How to use AppLinking : There are three ways to create AppLinking: suitable for different scenarios:

  • AGC interface creation: On the AGC homepage -> click "My Project" and select the corresponding project -> find "Growth"-"App Linking" in the left menu bar. Create the link prefix in the AppLinking interface first, and then create the AppLinking.
    This method is mainly used by marketing colleagues who do not understand the code, but the deep link address used in it still needs to be obtained from the development colleagues.

  • Android application creation: In the Android application, the AppLinking SDK is integrated, and the link is created in real time through related codes such as build.buildAppLinking().
    This method is mainly provided for real-time creation of Android users, such as an activity page in an application, adding a sharing button, clicking the sharing button, and creating an AppLinking link.

  • Create in iOS app: Like Android app, this is to create link in iOS app using code.
    This method is mainly provided to iOS users, allowing iOS users to create and share in real-time through code in the app.

How to use on non-Huawei phones:

AppLinking is cross-platform, that is, it is applicable to all Android and iOS, so many students must be concerned about the question "How to use AppLinking on non-Huawei Android phones?" The following questions should be answered accordingly:

1. Can non-Huawei mobile phones use AppLinking? —— App Linking does not rely on HMS Core and can be used on all Android devices, and is common to GMS and HMS devices.

2. How to use AppLinking if the app is not installed and Huawei App Market is not installed on the phone? - For not installed AppGallery Android phone, you can AppLinking configured to open the local market application , so the system will boot Android lets you choose which to open the store by store, as long as the same package name you can store any application details page.

Usage example

// 1、典型的链接前缀

https://photoplaza.drcn.agconnect.link       // 其中photoplaza为应用唯一参数,drcn.agconnect.link为系统固定参数。

// 2、典型的AppLinking链接:

https://photoplaza.drcn.agconnect.link/vm3Y

// 3、 典型的Android创建AppLinking
private static final String DOMAIN_URI_PREFIX = "https://photoplaza.drcn.agconnect.link";private static final String DEEP_LINK = "https://developer.huawei.com";public void createAppLinking() {
     AppLinking.Builder builder = new AppLinking.Builder()
             .setUriPrefix(DOMAIN_URI_PREFIX)
             .setDeepLink(Uri.parse(DEEP_LINK))
             .setAndroidLinkInfo(new AppLinking.AndroidLinkInfo.Builder().build());
     String LongAppLinking = builder.buildAppLinking().getUri().toString();
 }
// 4、典型的iOS创建AppLinking

- (IBAction)CreatLink:(id)sender {
AGCAppLinkingComponents *component = [[AGCAppLinkingComponents alloc] init];
component.uriPrefix = @"https://photoplaza.drcn.agconnect.link";     
component.deepLink = @"https://www.developer.huawei.com";     
component.iosBundleId = @"com.lucky.agc.demo";
    component.iosDeepLink = @"agckit://ios/detail";
    self.longlink.text = component.buildLongLink.absoluteString;

7. Related reference links

Stamp link official document:https://developer.huawei.com/consumer/cn/doc/development/AppGallery-connect-Guides/appgallery-agd-introduction-stamped

App Linking official document:https://developer.huawei.com/consumer/cn/doc/development/AppGallery-connect-Guides/agc-applinking-introduction-0000001054143215

Add attribution parameter document:https://developer.huawei.com/consumer/cn/doc/development/AppGallery-connect-Guides/appgallery-referrer-createlink

Get attribution information:https://developer.huawei.com/consumer/cn/doc/development/AppGallery-connect-Guides/appgallery-referrer-develop


Original link:https://developer.huawei.com/consumer/cn/forum/topic/0201448086867860655?fid=0101271690375130218&pid=0301448086867860778

Author: Mayism

Guess you like

Origin blog.51cto.com/14772288/2664179