Software Archive
Read-only legacy content

Removing added permissions

Mike_C_4
New Contributor I
509 Views

 

Hello,

I have added some permissions in the build setting tab. 

I complied my application and now I'm getting a plugin- error:

org.apache.cordova.inappbrowser,
org.apache.cordova.media ]
Writing out cordova_plugins.js...
Undefined

I checked the permissions I just added and I realized it was formatted improperly, so I deleted the permissions  and removed the plugin ( just to get back to normal state), I recompiled and I get the same message. So I checked the file  "intelxdk.config.android.xml" and I see that the badly formatted tag is still there.

<preference name="android-permission" value="name=&quot;$PACKAGE_NAME.permission.C2D_MESSAGE&quot;"/>

I then remove all the cache files and restarted the application the bad permission settings are now back in the add permission textbox ( where I had deleted it before I closed the application)

What is the proper way to remove the added permission? this is causing me some real time issue. any help would be great.

 

0 Kudos
10 Replies
PaulF_IntelCorp
Employee
509 Views

Make a copy of the <project-name>.xdk file that is in your project directory. Open that file in a code editor (it is a standard JSON file) and you'll find the permissions listed in there. Convert that line (or lines) into something that looks like this:

        "addlPermissions_": "",


Do not do this while the XDK is running!

When you are finished, save the file and restart the XDK. The extra permissions should be gone from your build settings.

0 Kudos
Renato_B_
Beginner
509 Views

I've the same or similar problem

The application began reporting use of camera (privacy permissions - take photos/record videos) without I've required this feature. I'm using only a few Cordova plugins (game / statusbar / orientationlock). I want to remove this permission but do not know how to do.

Thanks in advance.

0 Kudos
Pamela_H_Intel
Moderator
509 Views

Renato,

It sounds like you did not add permissions as Mike did. Paul's solution for Mike is to help him remove permissions that he added. If you did not add any permissions yourself, then the permissions were added by your plugins (or by their dependency plugins). 

Read the documentation for the plugins that you used to see what permissions they require and if they have any dependency plugins that require other permissions. Also see https://software.intel.com/en-us/forums/intel-xdk/topic/591986#comment-1838703

 

0 Kudos
Renato_B_
Beginner
509 Views

Hi Pamela

 

Thanks for the reply

I'm using Intel XDK and I did not find any reference to the permissions in the xml files. I just use the follow cordova/phonegap plugins:

paypal
screen orientation
inapp
game

hide status bar

Paypal was the last one plugin that I inserted. Anyway to remove the one permission from Intel XDK or xml files? I only want to remove the access to the camera.

Do you know where I'll found the documentation about this plugins?

Thanks

0 Kudos
Pamela_H_Intel
Moderator
509 Views

Renato,

For finding information about the plugins:

The plugins are usually hosted in a github repo with a README file. For example, if this is the paypal plugin you used: https://github.com/paypal/PayPal-Cordova-Plugin, then go to that site and scroll down to the README text.

Another thought - did you start clean, or did you start with a sample project that may have had permission requirements you were unaware of?

0 Kudos
Renato_B_
Beginner
509 Views

Pamela

I started a new project. I discovered my problem: Paypal plugin (Cordova/Phonega) require the camera access because the user can scan the credit card  if he want. I need to disable it. I don't want this feature. Can I edit the manifest to insert some lines to disable it? 

Please, look the informations about the issue that I found in the stackeroverflow (android.permission.CAMERA from AndroidManifest.xml):

http://stackoverflow.com/questions/20000715/android-paypal-integration-without-card-io

Could you help me?

Thanks

Edited: I found this reference about how to implement a plugin to change manifest but I don't know what I need to do: 

https://software.intel.com/en-us/xdk/faqs/general
Q14: Is it possible to modify Android* Manifest through Intel XDK?

0 Kudos
PaulF_IntelCorp
Employee
509 Views

@Renato -- if you want to do what is being described in the SO reference, you'll need to download the plugin (turn it into a local plugin) and then make the changes described in that SO post to the local copy. Then include the plugin as a "local" plugin with your project. I recommend you do this with the EA release or wait for our next major update (coming very soon) -- as these versions of the XDK handle plugins much differently, in a way that makes this sort of process much easier.

0 Kudos
Renato_B_
Beginner
509 Views

Thanks @Paul

I'll wait the new Intel XDK version.

0 Kudos
milan_h_
Beginner
509 Views

I am working on PayPal (Intel XDk Cordova) . For this I came to this link. According to the instruction I created Cordova Project , added platform android and IOS , added Plugin PayPal and then build my project. Now at this time I have A full Cordova Project containing the this link's PayPal plugin.

Then I created Intel XDK project . Included all the permission . Then in www folder I place the PAyPal Cordova project which I created before(above). Included the example code and necessary file of js to www folder. Two buttons as describe in example and all necessary Paypal keys . Now In :"Add Plugin" of project I added the local plugin with these details:

Name: PayPalMobile id: com.paypal.cordova.mobilesdk location: myPathtoHomeDirectory/IntelProjects/PayPalIntel/www/PayPalMobileCordovaPluginProject

After all this I build my intel project . But I am not getting successful build. Getting error messages.Log is given below. Any help will be appriciated.

I am unable to upload the attachment because of large size of project.

The build failed. An error occurred while building the application. Verify your build assets are correct and try again. Build Log: Building a Cordova 3.3 application. Plugin "PayPalMobilePlugin" installed. Updated "debuggable" to "false" An unexpected error occured while attempting to build the application.////////////////////////////////This Error

0 Kudos
PaulF_IntelCorp
Employee
509 Views

That plugin cannot be used with our current build system because the plugin depends on gradle build scripts, which, for security reasons, our build system will not execute. The only alternative is to build the app yourself, using Cordova CLI. See line 78 in this file > https://github.com/paypal/PayPal-Cordova-Plugin/blob/master/plugin.xml < for the gradle script reference.

We are working on improvements to our build system that will allow for the use of gradle scripts in plugins, but until that build system is deployed we cannot support such plugins. Sorry, but company policy does not allow me to publish when that build system will be deployed.

0 Kudos
Reply