shouldSkipAppInitialize
@JvmStatic
@JvmName(name = "shouldSkipAppInitialize")
Checks if the current process is the dedicated process for the In-Person Payments SDK.
The SDK operates in a separate process from the main application. Since the Application.onCreate()
method is called for every process, this helper can be used to prevent application-specific initializations from running unnecessarily in the SDK's process.
Example:
class MyApp : Application() {
override fun onCreate() {
super.onCreate()
if (InPersonPaymentsTools.shouldSkipAppInitialize(this)) {
// Skip main app initializations if we are in the SDK's process.
return
}
// Proceed with regular application initialization.
initializeMyAnalytics()
initializeMyDependencyInjection()
}
}
Content copied to clipboard
Return
true
if the current process is the In-Person Payments SDK process and main app initializations should be skipped; false
otherwise.
Parameters
context
The application context.