Checks if analytics is enabled in the MobilePush SDK.
Syntax
MCReactModule.isAnalyticsEnabled() ⇒ Promise.<boolean>
Returns
Promise.<boolean>- A promise to the boolean representation of whether analytics is enabled.
Example
import { MCReactModule } from "react-native-marketingcloudsdk";
const checkAnalyticsStatus = async () => {
try {
const isEnabled = await MCReactModule.isAnalyticsEnabled();
console.log("Analytics enabled:", isEnabled);
} catch (error) {
console.error("Error checking analytics status:", error);
}
};