Cordova Anti Tampering

Has anyone implemented this plugin in their project?
I have implemented the plugin but and called this function:

window.cordova.plugins.AntiTampering.verify(
function (success) {
console.info(success);
// {“assets”: {“count”: x}} - where x is the number of assets checked
},
function (error) {
console.error(error);
// gives you the file on which tampering was detected
}
);

The problem is, the function goes in the success block but the count is 0, which means the plugin doesn’t actually scan any files. I want to know what’s wrong.

Mentioning the steps that I have followed:

Step One: Installation using cmd.
command was:
cordova plugin add cordova-plugin-antitampering --variable ENABLE_CORDOVA_CALLBACK=true --save

Step two: Invoke method in app.component.ts using this code:

declare var window: any

constructor(){
this.checkTampering();
}

checkTampering( ) {
alert(“Inside Check Tampering”);
try {
alert("Inside Try: ");
window.cordova.plugins.AntiTampering.verify(
function (success) {
alert(JSON.stringify(success));
// {“assets”: {“count”: x}} - where x is the number of assets checked
},
function (error) {
alert(JSON.stringify(error));
// gives you the file on which tampering was detected
}
);

} catch (e) {
  alert("Caught some exception when implementing Integrity check: " + JSON.stringify(e));
}

}

Step 3 : Run it on the device using command: ionic cordova run android

I have added the plugin to the project . I have kept the default functionality (default usage behavior). All it does is crash on start-up.
Edit : even though nothing is tampered, it still crashes the app.

You are probably making the same mistake I made. Instead of using “ionic Cordova run android”,
use the command : “ionic cordova build android” and then copy the app-debug.apk file from the path “YOURPROJECTFOLDER\platforms\android\app\build\outputs\apk\debug” and put it inside your phone or upload it on the drive and download it. Click on the APK to install it. (Manual Installation). Then it wont throw any errors or crash. It will also return a count of how many files it checked, if you choose to implement the verify function also.