Last Modified October 2, 2026

Adding software_DNA to Android Studio

  1. Overview
  2. Setting mandatory DNA Properties

 

To include software_DNA into your Android Studio Project:

  1. in the "app / src / main / java" folder of your Project, create the sub-directories "com/softworkz/dna"

  2. copy the DNAINT.java file in the "com/softworkz/dna" folder such that the path of the DNAINT file is

    com/softworkz/dna/DNAINT.java

  3. copy the four(4) DNA Android Libraries (libdna.so) for the four architectures in the jniLib directory as follows:

    • Intel 32-bit libdna.so -> x86 folder
    • Intel 64-bit libdna.so -> x86_64 folder
    • ARM 32-bit libdna.so -> armeabi-v7a folder
    • ARM 64-bit libdna.so -> arm64-v8a folder

    The four libraries are named libdna.so, and can be distinguished by their size. See the ReadMe file included in the Library ZIP download package for the correct file sizes.

  4. Your project structure should look like the following:
    Android Studio Add to Project
  5. in your application's main source file include in the import section:

    import com.softworkz.dna.*;

You should now be able to add DNA API calls in your project as per our Implementation Guides.

 

Setting mandatory DNA Properties

For Android devices, the App must set the following DNA Properties using DNA_SetProperties() before any other DNA API calls:

Property Name Recommended Value
CDMPathName getApplicationContext().getFilesDir()+
File.separator + "<app_name>.txt"
deviceID Settings.Secure.getString(this.getContentResolver(),Settings.Secure.ADNROID_ID)
ComputerName android.os.Build.MODEL + android.os.Build.VERSION.RELEASE