Netsocks Docs and APIs
English
English
  • Home
  • Android SDK
    • SDK Integration
      • Dependencies
      • Use and installation
    • ProGuard
  • Flutter SDK
    • Sdk Integration
  • Portal
    • Publisher Key
  • Privacy
    • Google Data Safety
    • Add us to your privacy policy
  • Apps
    • VPN Apps
      • Policies
        • Null VPN
          • Privacy Policy
        • Easy VPN
          • Privacy Policy
Powered by GitBook
On this page

Was this helpful?

  1. Android SDK
  2. SDK Integration

Dependencies

First, it's necessary to add the following Maven repository inside the repositories block of the settings.gradle file

In projects that still use an old structure, repositoriesblock is located in thebuild.gradlefile at the app level

repositories {
     maven { url 'https://artifactory.netsocks.io/artifactory/maven' }
}

Once added, you can proceed to include the SDK. To do this, you need to enter the following line inside the dependenciesblock of the build.gradle file (:app level).

implementation ('io.netsocks:android-sdk:1.0.0-rc05') { changing = true }

In the same file, just above the repositories block, it is necessary to add the following code snippet to fetch the latest updates and ensure more efficient monetization:

configurations.all {
  resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}

If you do not include the above code snippet, monetization may be affected, as it ensures that you always have the latest version of our SDK.

Furthermore, in case you don't already have compatibility with Java 8, it's necessary to add these additional lines inside the android block, also in the samebuild.gradle file

compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

Once this is done, you can proceed with the installation and use of the SDK.

PreviousSDK IntegrationNextUse and installation

Last updated 1 year ago

Was this helpful?