We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All

StartIapActivityReq

  • Supported devices: phones, tablets, and HUAWEI Vision
  • Supported operating systems: EMUI 3.0 or later and Android 4.4 or later
Expand

Class Info

public class StartIapActivityReq implements IMessageEntity

Request information of the startIapActivity API.

Public Field Summary

Expand

Qualifier and Type

Field and Description

static int

TYPE_SUBSCRIBE_MANAGER_ACTIVITY

Redirects your app to the subscription management screen of HUAWEI IAP. It is used when you call the setType method.

static int

TYPE_SUBSCRIBE_EDIT_ACTIVITY

Redirects your app to the subscription editing screen of HUAWEI IAP. It is used when you call the setType method.

Public Constructor Summary

Expand

Constructor Name

StartIapActivityReq()

Constructs a StartIapActivityReq object.

Public Method Summary

Expand

Qualifier and Type

Method Name and Description

int

getType()

Obtains the type of the page to be redirected to.

String

getSubscribeProductId()

Obtains the product ID.

void

setType(int type)

Sets the type of the page to be redirected to.

void

setSubscribeProductId(String subscribeProductId)

Sets the ID of a purchased subscription.

Public Fields

TYPE_SUBSCRIBE_MANAGER_ACTIVITY

Expand

Fields

public static final int TYPE_SUBSCRIBE_MANAGER_ACTIVITY

Redirects your app to the subscription management screen of HUAWEI IAP. It is used when you call the setType method.

To learn more, please refer to Constant-values.

TYPE_SUBSCRIBE_EDIT_ACTIVITY

Expand

Fields

public static final int TYPE_SUBSCRIBE_EDIT_ACTIVITY

Redirects your app to the subscription editing screen of HUAWEI IAP. It is used when you call the setType method.

To learn more, please refer to Constant-values.

Public Constructors

StartIapActivityReq

Expand

Constructor

StartIapActivityReq()

Constructs a StartIapActivityReq object.

Public Methods

getType

Expand

Method

public int getType()

Obtains the type of the page to be redirected to.

Returns

Expand

Type

Description

int

Type of the page to be redirected to. The options are as follows:

  • 2: subscription management screen
  • 3: subscription editing screen

getSubscribeProductId

Expand

Method

public String getSubscribeProductId()

Obtains the product ID.

Returns

Expand

Type

Description

String

ID of a purchased subscription.

setType

Expand

Method

public void setType(int type)

Mandatory. Sets the type of the page to be redirected to.

Parameters

Expand

Name

Description

type

Type of the page to be redirected to. The options are as follows:

  • 2: subscription management screen
  • 3: subscription editing screen

setSubscribeProductId

Expand

Method

public void setSubscribeProductId(String subscribeProductId)

Optional. Sets the ID of a purchased subscription.

Parameters

Expand

Name

Description

subscribeProductId

ID of a purchased subscription, which is obtained through obtainOwnedPurchases.

NOTE

This parameter is required only for redirecting to the subscription editing screen.

Search
Enter a keyword.