Add plugin phonegap / cord

3

Hi, guys.

I'm trying to develop an APP on phonegap for Android and iOS. The purpose of the APP is:

1) The person will have a button to access the device's camera. 2) When the photo take screen of the device appears, you should have an image on the screen, type a target, something like that. When the person clicks to take the photo, the result has to be with that target (in the jpeg file, for example). 3) The photo appears on the APP screen to see if you liked ... 4) .. If she liked it, she clicks a button that brings up those native device sharing options.

I have already achieved (1) and (3). I copied this code: " link "

The code is EXACTLY the same as this gitHub link, the only thing I did was leave only one button that accesses the camera (because the access code to the images and gallery of the device, I do not need it).

My difficulty is (and I really want to understand this) how do I add a plugin. The sharing plugin found here: link

and the same plugin is in: link

When I use the code at the command prompt (I'm using windows7 ... but I'll also set up an OpenSUSE Tumbleweed this week) "phonegap plugin add nativescript-social-share" or the same command only with "cordova" the message "Can not find plugin.xml for plugin 'package' appears. Please try adding it again."

Actually there is a plugin.xml file inside "/ plugins / cordova-plugin-whitelist /" but it seems to be incompatible ... I created a plugin.xml with the code taken from: link

but still unsuccessful.

A lot of what I want to do and I'm sure I'll need more in the future are "ready", I just need to add plugins. I searched for several tutorials on the internet, which I liked the most: link

eur-lex.europa.eu eur-lex.europa.eu - = - = - = - = - = - = - = - = - = - = - = - = - = - = - =

What I did to create the project I'm trying to do this (my first!) on the command line I made "phonegap create HelloW com. Hello HelloWorld"

It was created cute, then made "phonegap platform add android" and "phonegap platform ios" (which seems not to be possible on windows, but files have been installed anyway)

Then I changed the css files to mine and the index.js file I took and pointed to "my_js.js". I added the HTML of the camera (first link) in the html and the JS (first link too) in this "my_js.js".

To test the APP I am using a MotoE2, with that PhoneGap application, which allows connection via "phonegap serves"

eur-lex.europa.eu eur-lex.europa.eu - = - = - = - = - = - = - = - = - = - = - = - = - =

What I know: I completely master HTML5, CSS3 and PHP. I have some basic understanding of javaScript and Python, and I'm starting to study Java.

Remembering that it is my FIRST contact with the phonegap ... if possible send me references where they learned to go deeper as well.

Thanks in advance! = D

    
asked by anonymous 12.12.2015 / 22:35

1 answer

1

To add a plugin just use the following command:

[phonegap][cordova] plugin add <nome do plugin>

Each plugin has its own methods and objects, so it's important to first check if it offers the features you need (and how to access them).

The social sharing plugin you specified seems to be compatible only with the Telerik platform, as there is no indication of compatibility with Cordova / Phonegap; in addition, I tried to install in Cordova and got errors, certainly the same thing that happened to you.

I suggest you take a look at the site ngCordova, it has a very good collection of plugins, including social sharing: link

    
14.12.2015 / 15:04