isActive static method

bool isActive(
  1. String productId
)

Checks whether the given product is currently active on the device.

Parameters

  • productId: The product identifier to query.

Returns

  • true if the product is active on this device, otherwise false. If the activation API is not available on this platform/SDK build, this method returns false.

Throws

  • May throw an exception for unexpected platform call failures.

Also see:

Implementation

static bool isActive(final String productId) {
  final OperationResult resultString = staticMethod(
    'ActivationService',
    'isActive',
    args: productId,
  );

  if (resultString['gemApiError'] == GemError.missingCapability.code) {
    return false;
  }

  return resultString['result'];
}