Set active signals list
By calling this method, the application can filter the list of signals collected in OIP Risk Management SDK.
The list of active signals contains the signals which are collected and are subsequently sent to the backend server for risk calculation.
Once the active signal list is set, the signal group and the corresponding signal list are saved and the same list will be used until this method or the setActiveSignalGroups() method is called again.
If this method is not called at all, by default all the signals under each signal group will be collected as per configuration set during initialization.
Note
The
DEVICE_IDsignal under the Device Signal group is mandatory to get visitID from the backend server. The signal groups passed tosetActiveSignalGroups()will override the Signal groups set by this method.
final Map<GAHSignalGroupConstants.ISignalGroupName, List<GAHSignalGroupConstants.ISignalName>> providerSignalNames = new HashMap<>();
final List<GAHSignalGroupConstants.ISignalName> signalList = new ArrayList<>();
//Add signals to be active under a signal group, e.g.: Device signal group
signalList.add(GAHSignalGroupConstants.DeviceSignalEnum.ANDROID_ID);
signalList.add(GAHSignalGroupConstants.DeviceSignalEnum.DEVICE_ID);
//Add Signal groups and corresponding signals under that group into a map
providerSignalNames.put(GAHSignalGroupConstants.SignalGroupEnum.DEVICE, signalList);
//Similarly set active signals from other signal groups
//If any signal group is not set, then no signals under that group will be collected
//Set active signals map to OIP Risk Management SDK
GAHCore.setActiveSignals(providerSignalNames);
Where the Map key is the signal group name and the Map value is the list of all signals which needs to be collected under the corresponding signal group.
All the signal groups are listed under SignalGroupEnum and the signals in a group are listed in the corresponding Group enums in GAHSignalGroupConstants.java file of OIP Risk Management.
//Add signals to be active under a signal group, e.g.: Device signal group
NSArray *devicesignals = @[DEVICE_SIGNAL_MANUFACTURER, DEVICE_SIGNAL_MODEL,
DEVICE_SIGNAL_IDENTIFIERFORVENDOR, DEVICE_SIGNAL_FINGERPRINT,
DEVICE_SIGNAL_SCREEN_WIDTH, DEVICE_SIGNAL_SCREEN_HEIGHT,
DEVICE_SIGNAL_BATTERY, DEVICE_SIGNAL_MEMORY, DEVICE_SIGNAL_PROCESSOR];
//Create a list of signals to be collect
NSMutableDictionary *providerFamilydict = [NSMutableDictionary dictionaryWithObject:devicesignals forKey:SIGNAL_GROUP_DEVICE];
//Similarly set active signals from other signal groups
//If any signal group is not set, then no signals under that group will be collected
//Set active signals to OIP Risk Management
[GAHCore setActiveSignals: providerFamilydict];
//Add signals to be active under a signal group, e.g.: Device signal group
let devicesignals = [DEVICE_SIGNAL_MANUFACTURER, DEVICE_SIGNAL_MODEL,
DEVICE_SIGNAL_IDENTIFIERFORVENDOR, DEVICE_SIGNAL_FINGERPRINT,
DEVICE_SIGNAL_SCREEN_WIDTH, DEVICE_SIGNAL_SCREEN_HEIGHT,
DEVICE_SIGNAL_BATTERY, DEVICE_SIGNAL_MEMORY, DEVICE_SIGNAL_PROCESSOR]
//Create a list of signals to be collect
let providerFamilydict = [SIGNAL_GROUP_DEVICE: devicesignals]
//Similarly set active signals from other signal groups
//If any signal group is not set, then no signals under that group will be collected
//Set active signals to OIP Risk Management
GAHCore.setActiveSignals(providerFamilydict)
Where the SIGNAL_GROUP_DEVICE is the signal group name and Devicesignals contains the name of all the signals which needs to be collected under the corresponding signal group.
All the signal groups are listed in SIGNAL_GROUP CONSTANTS and signals under a group are listed in SIGNAL CONSTANTS in GAHSignalGroupConstants.h.