đ¤Android
đ Prerequisites
freeRASP requires a minimum SDK level of 23. To update the minimum SDK level of the application, follow these steps:
From the root of your project, go to
build.gradle
.Update
minSdkVersion
to at least 23 (Android 6.0) or higher.
đĻ Add the dependency
Set Talsec's Artifact Registry in your project's build.gradle
(or settings.gradle
if you are using settings repositories):
Make sure that Talsec's maven dependency is at the last position.
Set dependencies in your :app module's build.gradle
:
âī¸ Setup the Configuration for your App
To ensure freeRASP functions correctly, you need to provide the necessary configuration. All required values must be filled in for the plugin to operate properly. Use the following template to configure the plugin. Detailed descriptions of the configuration options are provided on the API page.
Create an arbitrary subclass of
Application()
, override itsonCreate()
method and implementThreatListener.ThreatDetected
interface. You can, of course, use yourApplication
subclass if you already have one in your project.TalsecApplication.ktAdd a new subclass to
AndroidManifest.xml
, inside<application>
tag:AndroidManifest.xmlSet up the Configuration for your app with your values, which are explained in more detail in API.
TalsecApplication.ktTalsecApplication.kt
đˇ Handle detected threats
You can handle the detected threats using listeners. For example, you can log the event, show a window to the user or kill the application. See the Threat detection to learn more details about the performed checks and their importance for app security.
Implement methods of
ThreatListener.ThreatDetected
interface:TalsecApplication.ktOptionally, you can use a device state listener to get additional information about the device state, like passcode lock and HW-backed Keystore state:
TalsecApplication.ktModify initialization of
ThreatListener
:TalsecApplication.kt
đĄī¸ Start freeRASP
đĢŖ Enable source code obfuscation
You can make sure that the obfuscation is enabled by checking the value of minifyEnabled
property in your module's build.gradle
file.
Read more about why this is important in the wiki.
Last updated