Doubt when using the corp inappbrowser plugin

1

I'm using the inappbrowser plugin to access from within my webapp some pages that are on my server. So far so good, it works perfectly, but I'm trying to use another plugin from the cordova inside those files that are on the server, the plugin " vibration of cordova but I can not because I do not have cordova.js and even if I only take that javascript file there, it will not be enough, because this file uses many things.

Has anyone ever gone through this? Do you know how to solve this dependency?

    
asked by anonymous 02.07.2015 / 15:26

1 answer

1

Friend, you have a very complicated problem here. Almost no Cordova plugin is only in JavaScript, they have a Java-coded part or other languages depending on each platform, in addition to needing permissions for each action.

For example in the mentioned Vibration plugin we realize that inside the SRC folder there are several codes that must be added to the application project. Not being able to be requited from a server.

Another problem that can easily occur is the hosting of different versions of JS files, which may cause future problems.

However ...

As Cordova is a relatively new technology that does not support everything, it is still common to find users and developers thinking about alternatives and solutions to problems like this.

I do not know how you intend to embed this plugin into your project and when it should be embedded. But I suppose you should want to use it in just one specific case. For example request the plugin only when notifications are activated or something similar.

If it's something like this, I recommend that you implement all the functions in your application, but all the functions you use and can use, so create events in your application to trigger these functions. This way you can communicate with your web server using JavaScript requests, but issuing events. And yes, the application should be larger in size, but everything should work fine.

    
06.07.2015 / 19:06