Logo
Android SDK Obfuscation
To initialise the SDK add the below line of code with the public key you retrieved from Sense client panel. If you don't have a public key create new one and call that below function.
  1. Maven Installation
    copy-icon
    copy-icon
    repositories {
        ...
        mavenCentral()
        maven { url 'https://mvnrepository.com/artifact/ai.gosense/android'}
        maven { url 'https://jitpack.io' }
    }
    Check out maven for latest version of maven versions.
  2. Add Dependency build.gradle file
    copy-icon
    copy-icon
    dependencies {
        implementation("ai.gosense:senseprotect:0.0.1")
    }
    In App's build.gradle, add below snippet in plugins block and configure the ProtectPlugin block.
    copy-icon
    copy-icon
    plugins {
      ....
      ....
      id 'ai.gosense.senseprotect'
    }
    copy-icon
    copy-icon
    ProtectPlugin {
    encryptStrings.set(true) // Encrypt string literals
    obfuscateControlFlow.set(true) // Obfuscate conditional jumps
    addDeadCode.set(true) // Insert harmless dead code before returns
    obfuscateNames.set(true) // Rename private fields and methods to random short names
    obfuscateBuildConfig.set(true) // Apply transformations to BuildConfig classes (e.g., encrypt string constants)
    obfuscateResources.set(true) // Enable resource file name obfuscation
    minStringLength.set(3) // Minimum length for strings to encrypt (avoids short keys/IDs)
    encryptionKey.set(42) // Encryption key for string encryption (change to a random int for production)
    excludePackages.addAll([])
    verbose.set(true) // Set to true for detailed processing logs during build
    }