ionic-risk-sdk
v0.1.0
Published
Device Connect Ionic SDK is used to collect anonymised non-PII data from the devices of the users after taking explicit user consent.
Downloads
12
Readme
ionic-risk-sdk
Device Connect Ionic SDK is used to collect anonymised non-PII data from the devices of the users after taking explicit user consent.
Install
npm install ionic-risk-sdk
Authentication
Open Android Studio and in the project level build.gradle file, add the repository URLs to all allprojects block.
maven {
url "s3://risk-manager-android-sdk/artifacts"
credentials(AwsCredentials) {
accessKey = "<ACCESS_KEY>"
secretKey = "<SECRET_KEY>"
}
content {
includeGroup("in.finbox")
}
}
Add the following keys in local.properties
file:
ACCESS_KEY=<ACCESS_KEY>
SECRET_KEY=<SECRET_KEY>
DC_SDK_VERSION=<DC_SDK_VERSION>
COMMON_SDK_VERSION=<COMMON_SDK_VERSION>
COMMON_FLAVOR=<COMMON_FLAVOR>
LOGGER_SDK_VERSION=<LOGGER_SDK_VERSION>
::: warning NOTE Following will be shared by FinBox team at the time of integration:
- ACCESS_KEY
- SECRET_KEY
- DC_SDK_VERSION
- COMMON_SDK_VERSION
- COMMON_FLAVOR
- LOGGER_SDK_VERSION
- CLIENT_API_KEY :::
Register the Plugin
Inside the app’s MainActivity
, use registerPlugin
method to register Ionic Risk plugin
// Register the Risk Plugin
registerPlugin(IonicRiskSdkPlugin.class);
Create the user
Create the user by passing API key and Unique Customer Id
const token = await IonicRiskSdk.createUser({ apiKey: API_KEY, customerId: CUSTOMER_ID });
Set Periodic Syncs
Start the periodic syncs
IonicRiskSdk.startPeriodicSync();