Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AndroidLinkInfo

Hierarchy

  • AndroidLinkInfo

Index

Constructors

constructor

Properties

android_deeplink

android_deeplink: string = ""

android_fallback_url

android_fallback_url: string = ""

android_min_version

android_min_version: number = 1

android_open_type

android_open_type: number = 0

Methods

setAndroidDeepLink

  • setAndroidDeepLink(link: string): void
  • en

    Sets the deep link to an Android app.

    zh

    设置 Android 应用的 DeepLink。

    example
    let androidLinkInfo = new huawei.agc.applinking.AndroidLinkInfo();
    androidLinkInfo.setAndroidDeepLink("https://docs.cocos.com");
    

    Parameters

    • link: string

      Android DeepLink

    Returns void

setFallbackUrl

  • setFallbackUrl(url: string): this
  • en

    Sets a custom URL to be accessed when the app is not installed. If this method is not used, the app details page in HUAWEI AppGallery is displayed by default when a user taps an link of AppLinking.

    zh

    设置未安装应用时的自定义打开地址。如果不使用此方法,默认跳转到华为应用市场页面的应用详情页面。

    example
    let androidLinkInfo = new huawei.agc.applinking.AndroidLinkInfo();
    androidLinkInfo.setFallbackUrl("https://yourapp.drhw.agconnect.com/applink");
    

    Parameters

    • url: string

      Custom redirect address of an app

    Returns this

setMinimumVersion

  • setMinimumVersion(version: number): void
  • deprecated
    en

    Sets the earliest version of an app where a link of AppLinking can be properly opened.

    zh

    设置打开 AppLinking 所需要的应用最低版本。

    example
    let androidLinkInfo = new huawei.agc.applinking.AndroidLinkInfo();
    androidLinkInfo.setMinimumVersion(1);
    

    Parameters

    • version: number

      Earliest version of an app where a link of AppLinking can be properly opened. If a user's app version is earlier than this specified version, when a user taps the link of AppLinking, the HUAWEI AppGallery page is displayed, prompting the user to upgrade the app. This parameter corresponds to versionCode on Android. The value is a positive integer that does not exceed 2100000000.

    Returns void

setOpenType

  • en

    Sets the action triggered when the link of an Android app is tapped but the app is not installed.

    zh

    设置 Android 应用未安装时的打开方式。

    example
    let androidLinkInfo = new huawei.agc.applinking.AndroidLinkInfo();
    androidLinkInfo.setOpenType(huawei.agc.applinking.AndroidOpenType.AppGallery);
    

    Parameters

    • type: AndroidOpenType

      Action triggered when a link is tapped but the target app is not installed

    Returns void

Generated using TypeDoc