Issue in checkplugin function while implementation cordova plugins

Hi All,

I am trying to implement below cordova plugins. 

1. https://github.com/chemerisuk/cordova-plugin-app-review

2. https://github.com/paytm/paytm-allinonesdk-ionic-cordova

but issue s with check plugin function kindly check below code.

1.in app review plugin it goes to false statement here is the code

$parameters.IsAvailable = false;

if (typeof(window.plugins) !== 'undefined') {

    alert("hii");

  $parameters.IsAvailable = typeof(cordova.plugins.AppReview) !== 'undefined';

}else{

  alert("else = "+typeof(window.plugins));  

}

2. and same is with  allinonesdk plugin.it goes to false statement  here is the code

$parameters.IsAvailable = false;

if (typeof(window.plugins) !== 'undefined') {

alert("hiii"+typeof(AllInOneSDK));

  $parameters.IsAvailable = typeof(AllInOneSDK) !== 'undefined';

}else{

  alert("hiiisdvf"+typeof(window.plugins));  


}

please help me to resolve this issue.

Hi,

When I integrate a cordova plugin, I use the Template Plugin component (https://www.outsystems.com/forge/component-overview/1676/template-plugin). This template has a CheckTemplate_Plugin client action.

In this client action I write a similar code than you.

The plugin is loaded when it is declared in the extensibility configurations. In this example the cordova plugin is a local resource but it could be a remote resource via github.

With this information, the cordova plugin is used in an mobile app and attached in the compilation of MABS.

If you get a false in CheckPlugin call is because the plugin is not loaded properly: 

  • You are testing your app in a browser or emulator instead of mobile device.
  • You have configured incorrectly the cordova plugin (extensibility configurations or jscript).

Kind regards, David.

Hi @Swapnil Shinde,

In the First PlugIn : 

$parameters.IsAvailable = false;

if (typeof(window.plugins) !== 'undefined') {

    alert("hii");

  $parameters.IsAvailable = typeof(cordova.plugins.AppReview) !== 'undefined';

}else{

  alert("else = "+typeof(window.plugins));  

}


They used three names 

1. AppReview

2. InAppReview

3. AppReviewPlugIn

I try to check with three same error is coming 


Try other alternatives : 

https://github.com/pushandplay/cordova-plugin-apprate


https://github.com/dpa99c/cordova-launch-review


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.