I am running a phonegap build application version 3.4.0.
Phonegap build has a list of plugins https://build.phonegap.com/plugins where you can find a lot of them for example to send mails, etc.
But i can't see a plugin that retrieve the account information for android devices like the email or name of the owner.
To add a plugin you have a config.xml file in wich you add a line like this:
<gap:plugin name="com.jcjee.plugins.emailcomposer" version="1.4.6" />
My problem is that i found a plugin that seems to be useful: https://github.com/seltzlab/AccountList-Phonegap-Android-Plugin but i cannot find a way to include it on phonegap build compilation.
I can see that you can create a custom public plugin http://docs.build.phonegap.com/en_US/developer_contributing_plugins.md.html but i don't need that, i only need to use one, wich is already created.
Is there any way to achieve this?
Thanks in advance.
Related
Is it possible to set the app-id, name and version dynamically by CLI or a separated config file like build.json? I can not find satisfactory information in the documentation. I don't use the build.json. But it looks like that this is for app signing only.
And the build CLI seems to accept only the build type and device. But maybe there are more parameters. Maybe in buildConfig or platformOpts https://cordova.apache.org/docs/en/latest/reference/cordova-cli/
My alternative is to write a node script to replace the data in the config.xml. But I prefer a more official solution.
Cordova Version 9
This is not possible and will add. See the official message of a the Cordova member
In my case I write my own script to handle this.
I'm struggling for some days to do that. Without success.
I've found two ways that I think reasonably to follow:
1: Plugin cordova-sftp-plugin.
I see that it is writted to deal with 'secure ftp', but why wouldn't work in an ordinary non secure ftp? Nothing was metioned about it.
I've tried so, applying the 'Use Example' from the official page, the code fells in the success callback function, but when I list the local directory, nothing was changed! It gives me no clue about what goes wrong! In true, the software does not detect nothing wrong.
Before the previous steps, I did not forget to precautionally install and enable the 'cordova-plugin-file', 'cordova-plugin-file-transfer' and 'cordova-plugin-network-information' and to add the <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> in the AndroidManifest.xml. Tryied to save files in cordova.file.externalRootDirectory and cordova.file.externalRootDirectory + "/Downloads/. Nothing worked.
2. The macdonst FtpClient plugin.
Searching for my issue, one of the first pages that appears is How to ftp a file over to a server from PhoneGap/webapp?, and beyond some further search I've found another one in a relatively old post mentioned the successful use this plugin in a Cordova application. So I can consider this plugin as a stable choice.
The problem with this method comes earlier: I coundn't even build the application after a manual installation proccess. May it is a problem in the manual installation proccess.
The official plugin documentation teachs to install it in a PhoneGap application, and not a Cordova. The steps was not replicable to Cordova, due to some differences in paths and configuration, and some others links also supports the plugin installation solely in Phonegap, not Cordova.
I also tryied follow the steps in the http://antonylees.blogspot.com.br/2015/01/how-to-manually-add-cordova-plugins-to.html and Manually install Device plugin (and others) into cordova 3.0 to manually add the plugin. The steps in the first link also was not well replicable, and although the second one are more straitfoward, also does not solved the issue.
Building it gives me a java error compilation. The first error output (what uses to cause all the following errors are):
E:\danilo\Documentos\projetos_cordova\ftpDownload3\platforms\android\src\com\phonegap\plugins\ftpclient\FtpClient.java:27:
error: package org.apache.cordova.api does not exist
import org.apache.cordova.api.CallbackContext;
Very strange. May I have to search for the org.apache.cordova.api jar file and put in the lib folder? Also, I did not forget to put the commons-net-2.2.jar in the project libs folder.
Can anyone have some suggestion to succeed this? I just want to download a file through ftp protocol and save locally and so, if there's an alternative method to succeed, it will be appreciated too.
Thanks in advance.
I'm trying to integrate push notifications using the pushwoosh plugin. I installed the plugin using the command line:
phonegap plugin add https://github.com/Pushwoosh/pushwoosh-phonegap-3.0-plugin.git
and in config.xml:
<access origin="*.pushwoosh.com" />
and added the javascript code for initPushwoosh() and the rest of the code.
Then when I build the app successfully
I found that pushwoosh plugin and some code from config.xml is removed automatically.
The push notification also does not work.
What am I missing?
Make sure you are editing the files in the correct "www" folder. There could be more than one "www" folders and one could override another when you make a build.
I'm trying to add a cordova plugin to a salesforce mobile android app. By default, the salesforce app uses the SalesforceSDK project as a library. This project already contains several cordova plugins listed in its config.xml file, however, when I try to add a plugin and config.xml file to my own project in the same way, cordova fails to initialise, citing 'Class not found' as the reason.
I've looked around to see what the structure should look like then to make it find the class, but every result I find shows a different way of setting up the config file, or adding a plugin.xml file somewhere, and nothing has worked so far because I just can't figure out how to do it properly.
Currently I only have
<?xml version="1.0" encoding="utf-8"?>
<plugins>
<plugin name="OpenAppPlugin" value="com.dev.testapp.OpenAppPlugin"/>
</plugins>
in my config file, because all the cordova guide says is to add that line.
Turns out, I had to copy the entire config.xml containing all the plugins to my own project and add the line to that.
I am working on an android app with Phonegap and Jquery Mobile which I will compile with build.phonegap.com.
I first want to know the difference between Manifest.xml and config.xml files, and also whether it is required to add androidManifest.xml when i am uploading the files to build.phonegap.com.
Secondly i will like to know if there will a device problem assuming i add three different Manifest.xml for three difference devices eg, android, ios and blackberry when i upload the files to phonegap build.
Thank you
First Answer: Diff between manifest.xm and config.xml files .... now manifest is where u declare stuff like
1> Package
2>version
3> install location and many more btw i just finish one of my phongap and there is not config in my files though ...
second question .. i dont know about that david ... you can probly go to google !!
First of all manifest.xml is using only for your android application. It defines permissions, services, broadcastresivers ,activities and intents. This file will be using by JVM to register your application on device.
Config.xml is using for cordova library, to define all plugins(interfaces between js and jsvs layer).