Security

The Security extension enables to control if a device is rooted or jailbroken.

Using Security extension in the IDE

To be able to use the extension in your IDE and the autocompletion feature for example, please refer to the section: Importing an extension in the IDE.

Using the Security extension

Declare the extension in the URS:

<urs>
    [...]
    <extensions>
        <extension path="@system/Security" />
    </extensions>
</urs>

Add the following import:

import com.neomades.security.RootAndJailbreakDetector;

Call the following static metod in your code:

if (RootAndJailbreakDetector.isRootedOrJailbroken()) {
    // TODO: device rooted
}