Handling Security Events
Event Processing Example:
private void handleInitializationSuccess(AlphynCallbackResult result) { if (result.getOriginalEventType() == AlphynEventType.FIRST_INIT) { Log.i("Byteria", "First time initialization completed"); // Perform first-time setup } else if (result.getOriginalEventType() == AlphynEventType.INIT_COMPLETE) { Log.i("Byteria", "SDK ready for use"); // Continue with normal app flow }}
private void handleScanSuccess(AlphynCallbackResult result) { if (result.isScanResponse()) { AlphynScanResult scanResult = result.getScanResult(); Log.i("Byteria", "Scan completed: " + scanResult.getDisplayName());
switch (scanResult) { case TRUSTED: Log.i("Byteria", "Application is trusted ✅"); break; case FLAGGED: Log.w("Byteria", "Application flagged for review ⚠️"); handleFlaggedResult(); break; case UNTRUSTED: Log.e("Byteria", "Application is untrusted 🚨"); handleUntrustedResult(); break; } }}