Security Event Listener
The SecurityEventListener class exposes a way to be notified of security issues that occur both during initialization of the SDK and at runtime. This is done via a single Alarm event:
Alarm
Fired when a security issue is detected.public class MySecurityEventListener implements SecurityEventListener {
...
public void alarm(Severity severity, SecurityEvent event) {
TransactionManager.getInstance().showToast("[Security Alarm] Severity: " + severity + ", Event: " + event);
}
...
}
If a security issue is detected, the Alarm event will be raised. The severity of the error will be indicated by the severity event parameter. Possible values are:
- LOW
- MEDIUM
- HIGH
The event parameter will indicate which issue was encountered. Possible values are:
- ROOT
- TAMPERED
- INSTALLED_FROM_UNTRUSTED_STORE
- HOOK
- EMULATOR
- DEBUGGING
- DEBUG_ENABLED
For more information on the security checks performed by the component, and recommendations on handling detected issues, see the Security Checks section below.