SDK Initialization
Required Parameters:
Context: Application context (required)
Initialization Example:
public class ByteriaApplication extends Application { @Override public void onCreate() { super.onCreate();
// Initialize as early as possible, off the main thread AlphynSDK.initializeAsync(this, error -> { if (error != null) { Log.e("Byteria", "Initialization failed: " + error.getMessage()); } }); }}Best Practices:
- Initialize in
Application.onCreate()for best performance - Use
initializeAsync:initializereturns only once setup has finished, so on the main thread it delays the app’s first frame initializeAsyncthrowsIllegalArgumentExceptionfor invalid parameters at the call; any other failure arrives as the callback’serror- Check initialization status with
AlphynSDK.isInitialized()