stopServerCommunication

Stops communication with the Pushwoosh server.

This method disables all communication with Pushwoosh servers. The SDK will not send any data or register for push notifications until startServerCommunication is called. Use this to implement GDPR compliance or user privacy preferences. Example:


  // User opts out of notifications/tracking
  if (userOptsOut()) {
      Pushwoosh.getInstance().stopServerCommunication();
  }

  // GDPR compliance: stop communication until user consents
  if (!userHasGivenConsent()) {
      Pushwoosh.getInstance().stopServerCommunication();
  }

See also