anand
anand

Reputation: 1459

How to call a custom cordova plugin from cordova app?

I am very new in cordova. I am trying to create a cordova plugin and trying to use it in another cordova app for android. I created the cordova plugin with help of plugman and command prompt. Then I created a cordova app in visual studio 2015. I added the plugin in cordova app. When I am trying to access the plugin method from the app, its not working. I am using following line to call the cordova plugin's method.

 cordova.exec(callback, error, "DemoPlugin", "getNextAppointment", [22]);

When the line exuctes I get following error:enter image description here

How I can fix this error, and we call the plugin method in right way in cordova app for android.

Upvotes: 1

Views: 584

Answers (1)

Elvis Xia - MSFT
Elvis Xia - MSFT

Reputation: 10841

It looks like you are using Ripple for your app. But Ripple doesn't support simulation of Cordova APIs or native device capabilities (plugins). Please refer to the first caution section of Run your Apache Cordova app on the Apache Ripple simulator.

If you want to test your plugin, please use an Emulator or actual device instead.

Upvotes: 1

Related Questions