Nuclei Analytics Callback
Nuclei Analytics Callback
NucleiAnalyticsCallback is used if the partner app wants to know the analytics that happen inside Nuclei SDK.
Implement NucleiAnalyticsCallback
interface in the application class.
Please refer to the below code:
class Application extends MultiDexApplication implements NucleiAnalyticsCallback {
private NucleiSDK nucleiSDK;
@Override
public void onCreate() {
super.onCreate();
initNuclei();
}
public NucleiSDK getNucleiSDK() {
return nucleiSDK;
}
private void initNuclei() {
nucleiSDK = NucleiSDK.bind(this)
...
.setAnalyticsCallback(this)
...
.init();
}
/**
* Some of the actions taken by user inside Nuclei screen are captured in the form of events
* Partner app can get these even if required through this callback method
* @param eventType
* @param properties
*/
@Override
public void onTrackNucleiEvent(@AnalyticsEventType String eventType, Properties properties) {
}
}