getActivationsForProduct static method

List<ActivationInfo> getActivationsForProduct(
  1. String productId
)

Returns activations found for the specified product.

Retrieves a list of ActivationInfo objects representing activations for productId that are stored on this device.

Parameters

  • productId: The product identifier for which to list activations.

Returns

  • A list of ActivationInfo instances for the given product. If the activation API is not available on this platform/SDK build, this method returns an empty list.

Implementation

static List<ActivationInfo> getActivationsForProduct(final String productId) {
  final OperationResult resultString = staticMethod(
    'ActivationService',
    'getActivationsForProduct',
    args: productId,
  );

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

  return (resultString['result'] as List<dynamic>)
      .map((dynamic e) => ActivationInfo.fromJson(e))
      .toList();
}