isPushEnabled

The current state of the pushEnabled flag in the MobilePush SDK.

Syntax 

1MCReactModule.isPushEnabled()Promise.<boolean>

Returns 

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

Example 

1import { MCReactModule } from "react-native-marketingcloudsdk";
2
3const checkPushStatus = async () => {
4  try {
5    const isEnabled = await MCReactModule.isPushEnabled();
6    console.log("Push enabled:", isEnabled);
7  } catch (error) {
8    console.error("Error checking push status:", error);
9  }
10};

See Also 

Related Methods