API
Variables
TalsecConfig
TalsecConfig
Specifies configuration for your app. See the table below for a detailed description of the attributes.
expectedPackageName
String
Package name of the app.
"com.talsec.freerasp.demoapp"
expectedSigningCertificateHashBase64
Array<String>
Certificate hashes of your app. You must get your expected signing certificate hashes in Base64 form. You can go through this manual to learn how to sign your app in more detail, including manual signing and using Google's Play app signing.
arrayOf( "mVr/qQLO8DKTwqlL+B1qigl9NoBnbiUs8b4c2Ewcz0k=")
watcherMail
String?
The value is automatically used as the target address for your security reports. Mail has a strict form 'name@domain.com'
.
"john@example.com"
supportedAlternativeStores
Array<String>
Package names of the alternative stores on which you are publishing the application. The Google Play Store and Huawei AppGallery, are included internally. (You can assign just emptyArray()).
For more information, visit the Detecting Unofficial Installation wiki page.
arrayOf( "com.sec.android.app.samsungapps")
isProd
Boolean?
Defaults to true
when undefined. If you want to use the Dev version to make the development process viable, set the parameter to false
. Make sure that you have the Release version in the production (i.e. isProd set to true)!. To simplify switching between debug and release version of freeRASP based on the build type, you can use BuildConfig.BUILD_TYPE.contains("Release", true)
as a value for isProd
.
true
Classes
public class ThreatListener
public class ThreatListener
Constructor
public ThreatListener(@NonNull ThreatDetected threatsCallback, @Nullable DeviceState deviceStateCallback)
Listener for the threats detected by freeRASP
Methods
public void registerListener(Context context)
Registers your reactions to detected threats with freeRASP.
public void unregisterListener(Context context)
Unregisters the reactions to detected threats.
public final class Talsec
Methods
public static void start(Context context, TalsecConfig config)
The method used to start freeRASP's functionality.
public static void blockScreenCapture(Activity activity, boolean enable)
The method used to Block / Unblock screen Capture.
public static void isScreenCaptureBlocked()
The method used to Know the state of screen capture blocking whether blocked or not.
Interfaces
public interface ThreatDetected
public interface ThreatDetected
Methods:
void onRootDetected()
void onDebuggerDetected()
void onEmulatorDetected()
void onTamperDetected()
void onUntrustedInstallationSourceDetected()
void onHookDetected()
void onDeviceBindingDetected()
void onObfuscationIssuesDetected()
void onScreenshotDetected()
void onScreenRecordingDetected()
public interface DeviceState
public interface DeviceState
Methods:
void onUnlockedDeviceDetected()
void onHardwareBackedKeystoreNotAvailableDetected()
void onDeveloperModeDetected()
void onADBEnabledDetected()
void onSystemVPNDetected()
Last updated
Was this helpful?