Skip to main content

Android - How to Setup and Maintain settings.json

To connect your module to the core application, we use a settings.json. This file must contains information about you module, including the class path to the module, its identifier, and more.

Whenever you create a new module, or adjust an existing one, its important to make sure what is in the settings.json file still accurately represents your work.

Although the settings.json file found in DevApp isn't included in your artifact, we do use the information you provide us there when creating release builds.

Properties

  • onlineBankingURL
    • The url in which you want to point your testing to. Ideally this is your own sandbox url, or the url of the FI you are working with. This can be found at https://q2developer.com/dashboard, under Development Information -> Sandbox Online Banking.
  • sdk_modules
    • This array must contain an entry for each module you are developing. Each module must contain an identifier, name, and classPath. Data is optional.

sdk_modules Properties

  • identifier (required)
    • The identifier is a unique key value that is used to reference your module internally and from Tecton. We suggest to keep it to lower case letters and underscores. Ex. company_name_module_name
  • name (required)
    • Additional required unique key used to reference your module internally. Unless told otherwise, its often best to have this match the identifier.
  • classPath (required)
    • Must match exactly with the package name of your module, including the class's name. When the core does a lookup to load and or display your module, it will use this class path to find it. Any inconsistency here can result in the module failing to be found.
  • data (optional)
    • Contains any json data that you want to pass to your module. The structure must be pure json, but the contents of it can be whatever you need. This is often used to pass FI specific information to a module.

Example

Say I have created a new module called "MyModule". The classpath to it is "com.q2.module.MyModule".

package com.q2.module

import android.content.Context
import com.q2.sdk_interfaces.MethodModule
import com.q2.sdk_interfaces.SdkUtils

class MyModule(private val sdkUtils: SdkUtils) : MethodModule {
fun testMethod(context: Context, data: String, callback: MethodModule.MethodModuleCallback) {}
}

My settings.json file would then look like this:

{
"onlineBankingURL": "{url}/uux.aspx",
"sdk_modules": [
{
"name": "my_company_method_module",
"identifier": "my_company_method_module",
"classPath": "com.q2.module.MyModule",
"data": {
"example": "Data can be anything. Ideal for FI specific information"
},
"enabled": true
}
]
}