Set active signals list
By calling this method, the application can filter the list of signals collected in the Risk Management SDK.
The list of active signals contains the signals that are collected and are subsequently sent to the back-end server for risk calculation.
After the active signal list is set, the signal group and the corresponding signal list are saved and the same list is 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 are collected, according to the configuration set during initialization.
The DEVICE_ID signal under the device signal group is mandatory to get visitID from the back-end server. The signal groups passed to setActiveSignalGroups() overrides the signal groups set by this method.
Android
The Map key is the signal group name and the map value is the list of all signals that need 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 the Risk Management GAHSignalGroupConstants.java file.
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 Risk Management SDK
GAHCore.setActiveSignals(providerSignalNames);
iOS Objective C
//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 Risk Management
[GAHCore setActiveSignals: providerFamilydict];
Swift
The SIGNAL_GROUP_DEVICE is the signal group name and Devicesignals contains the name of all the signals that need 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.
//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 Risk Management
GAHCore.setActiveSignals(providerFamilydict)