Permissions & plugins

Hello all!

I have a general question about permissions and plugins. I have not had any success getting plugins to work in my build… I also noticed that when using Cordova 9.1.0 permissions were set that arent when using 10.1.1.

Lets start with permission first:

Building my app in 9.1.0 allowed me to create an HTML page, hit my server to get my IP address and start the app.

Building with 10.1.1 - I started getting errors locally for https & http POST requests while testing locally. I added the following change to config.xml to over come this.

<preference name="Scheme" value="http" />

I then started noticing ERR_CACHE_MISS errors whenever I build with 10.1.0. It seems all “INTERNET” related permission were not provided in the manifest. I had to manually include these.

<platform name="android">
    <config-file target="AndroidManifest.xml" mode="merge" parent="/manifest">
       <uses-permission android:name="android.permission.INTERNET" />
       <uses-permission android:name="android.permission.NETWORK_ACCESS" />
       <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
       <uses-permission android:name="android.permission.VIBRATE" />
       <uses-permission android:name="android.permission.SMS" />

That being said… I can’t even get the vibrate plugin to work. It works when testing on a tablet, but hasn’t work on a single phone I have tested. (Robin, and BlackBerry)

What am I missing?

  1. Permissions: It would be helpful if you included the actual messages.

  2. Plugins: It would be helpful if you included the actual name of the plugin you are using.

Hi! :slight_smile: Thanks for the fast reply.

  1. Permissions: I was able to fix this issue. The original post shows the permission I added for vibrate and network access. My question is: Does Volt Builder have features that auto-add permissions, or should I assume nothing is added and manually add the ones I need? - And a side question: Has any created a plugin to permission repository to ensure this is done correctly/automatically?

  2. The Plugin I was testing.

<plugin name="cordova-plugin-vibration" source="npm" spec="~3.1.1" />

A few questions: Is it best practices to include/remove the spec attribute? Should avoid using the gap:plugin tag? such as this SMS example?

<gap:plugin name="cordova-plugin-sms" source="npm" />

A little background: - I have created a drag drop UI tool called Nimble. It’s basically Visual Basic for Javascript. It created single page applications for browsers, electron, and originally Phone Gap. I am migrating my build process to Volt. Just trying to automate plugins, permission and streamline the process accurately.

  1. VoltBuilder doesn’t try to automatically add permissions - it would be really tough to do this in any reliable fashion.

  2. Does this issue on the plugin maintainer’s site sound like the problem?

VoltBuilder automatically changes <gap:plugin to <plugin, so you don’t need to fix it if you have it that way already. Obviously, there is no need to do it the old way.

It’s good to specify a spec. That way, the version of the plugin you know works will be used in the build. If you don’t specify the spec, VoltBuilder will use the latest version of the plugin. If the maintainer has updated it, your app might break.

Nimble looks cool. Did you notice VoltBuilder has an API so you can submit jobs directly from Nimble, skipping past the usual usual upload screen?

  1. Good to know… I will gather my common plugins and start building a local repository for these connections…

  2. Yes… So I guess I should revert back a version?

On the API - :slight_smile: Oh snap! I was wondering about that… Does Volt offer a partnership or affiliate program? I can send a pitch video and show Nimble’s features? It could benefit both projects. :slight_smile:

I’ll be replacing my PhoneGap logos once I get everything ironed out.

  1. It’s worth a try. We can’t really help much on individual plugins - there are over 1200, none of them produced by us.

Yes, we’re always interested in working with others to make users happy.