problem adding cordova plugin (phonertc)

problem adding cordova plugin (phonertc)

  

hello.

I'm trying to integrate phonertc (https://github.com/alongubkin/phonertc) in an outsystems app.

I've followed the standard integration procedure:

  1. created an app with a blank module;
  2. in the module's "extensibility configurations" added  { "plugin": { "url":"https://github.com/alongubkin/phonertc.git" } }
  3. created a new action that has some javascript in it (the javascript comes directly from the plugin's documentation, and I've used the plugin standalone successfully so I know they are correct)


  4. called the action from another app, after adding the required dependency

However, when testing on the device, the app crashes when it calls the plugin, and if I run it on the browser emulator, the console gives me "cordova is not defined", where the faulty line is var session = new cordova.plugins.phonertc.Session(config);

This makes it look like outsystems can't access the keywords defined by the plugin and I have no idea why.

The documentation for the plugin is available here

Solution

Hi,


I have a similar issue before.

I'm not sure if OutSystems is using cordova when we develop a web app or not. But If it is a mobile app, I believe you need to generate the native platforms, and cordova should be available.

Solution

Hello Kdek.

It would seem you are right. I just assumed the plugin was not recognized because the app crashed, but I called a different function and it worked fine, so the problem is with that function alone.

Thank you