Debug Information
Enable Debug Logging:
public class DebugSecurityListener implements AlphynSecurityListener { private static final String TAG = "ByteriaDebug";
@Override public void onSuccess(AlphynCallbackResult result) { Log.d(TAG, String.format("SUCCESS: %s | %s | %s", result.getOperationType(), result.getOriginalEventType(), result.getMessage())); }
@Override public void onFailure(AlphynCallbackResult result) { Log.w(TAG, String.format("FAILURE: %s | %s | %s | %s", result.getOperationType(), result.getOriginalEventType(), result.getMessage(), result.getDetails())); }
@Override public void onThreatDetected(AlphynCallbackResult result) { Log.e(TAG, String.format("THREAT: %s | %s", result.getOriginalEventType(), result.getMessage())); }}Event Timing Analysis:
public class EventTimingAnalyzer { private final Map<AlphynEventType, Long> eventTimings = new HashMap<>();
public void recordEvent(AlphynCallbackResult result) { AlphynEventType eventType = result.getOriginalEventType(); long currentTime = System.currentTimeMillis();
Long previousTime = eventTimings.put(eventType, currentTime);
if (previousTime != null) { long interval = currentTime - previousTime; Log.d("EventTiming", String.format("%s interval: %dms", eventType, interval)); }
// Log event details Log.d("EventDetails", String.format("Event: %s, Type: %s, Message: %s", eventType, result.getOperationType(), result.getMessage())); }}