SuperwallOptions
A configuration class for customizing paywall appearance and behavior.
Only modify networkEnvironment if explicitly instructed by the Superwall team. Use .RELEASE (default) for production apps.
Use different SuperwallOptions configurations for debug and release builds to optimize logging, purchasing behavior, and Google Play settings for each environment.
Purpose
Configures paywall presentation, logging, Google Play purchase behavior, and other global SDK settings. Pass an instance in to Superwall.configure.
Signature
class SuperwallOptions {
var paywalls: PaywallOptions = PaywallOptions()
var shouldObservePurchases: Boolean = false
var networkEnvironment: NetworkEnvironment = NetworkEnvironment.Release()
var isExternalDataCollectionEnabled: Boolean = true
var localeIdentifier: String? = null
var isGameControllerEnabled: Boolean = false
var passIdentifiersToPlayStore: Boolean = false
var enableExperimentalDeviceVariables: Boolean = false
var logging: Logging = Logging()
var useMockReviews: Boolean = false
}// Java
public class SuperwallOptions {
public PaywallOptions paywalls = new PaywallOptions();
public boolean shouldObservePurchases = false;
public NetworkEnvironment networkEnvironment = new NetworkEnvironment.Release();
public boolean isExternalDataCollectionEnabled = true;
public @Nullable String localeIdentifier = null;
public boolean isGameControllerEnabled = false;
public boolean passIdentifiersToPlayStore = false;
public boolean enableExperimentalDeviceVariables = false;
public Logging logging = new Logging();
public boolean useMockReviews = false;
}Parameters
Prop
Type
How passIdentifiersToPlayStore affects Google Play
Superwall always calls BillingFlowParams.Builder.setObfuscatedAccountId(Superwall.instance.externalAccountId) when launching a billing flow.
- Default (
false) –externalAccountIdis a SHA-256 hash of theuserId. Google Play displays the hashed value asobfuscatedExternalAccountId, and the same hash is sent back to your servers. - Enabled (
true) – Superwall forwards the exactappUserIdyou passed toidentify(). This makes it easier to correlate Google Play purchases with your users, but the value must comply with Google's policy and must not contain PII.
Configure it as part of your application startup:
val options = SuperwallOptions().apply {
passIdentifiersToPlayStore = true
logging.level = LogLevel.info
}
Superwall.configure(
application = this,
apiKey = "pk_your_api_key",
options = options
)Related
How is this guide?
Edit on GitHub