TamperDetector

Interface for detecting device tampering conditions such as rooting, jailbreaking, or other security compromises.

Implementations of this interface should provide methods to detect various forms of device modification that could potentially compromise the security of the application or user data.

This interface is designed to be extensible, allowing for different detection strategies and custom tamper detection logic based on specific security requirements.

The interface uses a scoring system where detectors return confidence levels as Double values:

  • 1.0 indicates high confidence that tampering is detected

  • 0.0 indicates no tampering detected

  • Values between 0.0 and 1.0 can indicate varying levels of suspicion

Inheritors

Functions

Link copied to clipboard
abstract suspend fun analyze(context: Context): Double

Determines if the current device has been tampered with or compromised.