isPiAnalyticsEnabled

Checks if PI analytics is enabled in the MobilePush SDK.

Syntax

MCReactModule.isPiAnalyticsEnabled() ⇒ Promise.<boolean>

Returns

  • Promise.<boolean> - A promise to the boolean representation of whether PI analytics is enabled.

Example

import { MCReactModule } from "react-native-marketingcloudsdk";

const checkPiAnalyticsStatus = async () => {
  try {
    const isEnabled = await MCReactModule.isPiAnalyticsEnabled();
    console.log("PI Analytics enabled:", isEnabled);
  } catch (error) {
    console.error("Error checking PI analytics status:", error);
  }
};

See Also

Related Methods