目录

StartIapActivityReq

Class Info

public class StartIapActivityReq implements IMessageEntity

Request information of the startIapActivity API.

Public Field Summary

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

Constructor Name

StartIapActivityReq()

Constructs a StartIapActivityReq object.

Public Method Summary

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

[h2]TYPE_SUBSCRIBE_MANAGER_ACTIVITY

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.

[h2]TYPE_SUBSCRIBE_EDIT_ACTIVITY

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

[h2]StartIapActivityReq

Constructor

StartIapActivityReq()

Constructs a StartIapActivityReq object.

Public Methods

[h2]getType

Method

public int getType()

Obtains the type of the page to be redirected to.

Returns

Type

Description

int

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

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

[h2]getSubscribeProductId

Method

public String getSubscribeProductId()

Obtains the product ID.

Returns

Type

Description

String

ID of a purchased subscription.

[h2]setType

Method

public void setType(int type)

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

Parameters

Name

Description

type

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

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

[h2]setSubscribeProductId

Method

public void setSubscribeProductId(String subscribeProductId)

Optional. Sets the ID of a purchased subscription.

Parameters

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.