In your build.gradle in your app directory you must set the String for each required {CLIENT_ID, REDIRECT_URI, SECRET, LICENSE} variable:
productFlavors {
prod {
resValue "string", "app_name", "DEMO"
buildConfigField 'String', 'CLIENTID', '""'
buildConfigField 'String', 'CLIENTSECRET', '""'
buildConfigField 'String', 'REDIRECTURI', '""'
buildConfigField 'String', 'LICENSE', '""'
}
}
Once the variables have been declared, you can make use of them by declaring an ISClientLib object in the onCreate of your Application file in the following way
class MyApp: Application() {
override fun onCreate() {
super.onCreate()
instance = this
BioApplication.initBioLibrary(isClientLib, licenseKey, secureFlag)
}
companion object {
lateinit var instance: MyApp
val isClientLib = ISClientLib(
BuildConfig.CLIENTID,BuildConfig.REDIRECTURI,
"email phone spec_data",
BuildConfig.REDIRECTURI)
}
}
Important: The licence key will be provided by Biocryptology.
Remarks: For your application to call the Application file and initialise the library, do not forget to declare it in your manifest:
<application
android:name=".MyApp"
... >