SDKs
...
Getting Started
C++
Android support
2min
since v7 38 0, licensespring provides a c++ sdk built using the android ndk, designed for android applications the sdk is compatible with android devices running android api level 24 (android 7 0 nougat) or higher ndk version 26 1 10909125 and 27 2 12479018 minimum android api level 24 (android 7 0 nougat) abi version arm64 v8 the sdk provides native c++ functionality and is optimized for performance on supported android devices jni initialization the sdk includes jni code used for computing the hardware id of the android device, and the default data path used for writing the license and log files secure getstring(getapplicationcontext() getcontentresolver(), secure android id) is used to compute the hardware id, context getfilesdir() getabsolutepath() is used to compute the default data path to set these values and integrate the native licensespring library into your app, we provide a small class that you need to include in your project package com licensespring android import android content context import android util log object licensespring { // this method decalaration exactly matches the signature declared in the licensespring sdk don't remove it external fun setandroidcontextandids(context context) init { try { system loadlibrary("licensespring") log d("licensespring", "native library loaded successfully") } catch (e unsatisfiedlinkerror) { log e("licensespring", "failed to load native library ${e message}") } } fun initialize(appcontext context) { try { setandroidcontextandids(appcontext applicationcontext) log d("licensespring", "native context and ids set successfully") } catch (e exception) { log e("licensespring", "error calling native method ${e message}") } } } you should include this snippet in your project and call licensespring initialize(context) during your app startup if you don't want to pass the context to the licensespring c++ sdk, you must set your own hardware id and data path a full example is contained in the samples/androidndksample project, together with a demo android app where you can activate and check licenses