I have generate and .apk using phonegap build and I'm having problem while trying to install it using a "Lg Optimus 3D" with Android version v.2.2.2. Here is the config.xml that I am using:
<?xml version="1.0" encoding="UTF-8" ?>
<widget xmlns = "http://www.w3.org/ns/widgets"
xmlns:gap = "http://phonegap.com/ns/1.0"
id = "com.xxxxxxx.jjjjjjjjjjjjjj"
version = "1.0.0">
<!-- versionCode is optional and Android only -->
<name>THE NAME</name>
<description>
THE DESCRIPTION
</description>
<author email="XXX...#gmail.com">
XXXXXXX
</author>
<icon src="icon.png" width="72" height="72" />
<feature name="http://api.phonegap.com/1.0/geolocation"/>
<feature name="http://api.phonegap.com/1.0/network"/>
</widget>
I have not had any problems with any devices till now... what is happening with that mobile phone? what could be the problem?
According to documentation here http://docs.build.phonegap.com/en_US/2.9.0/configuring_preferences.md.htmlwe preferences in config.xml should look like this
<preference name="android-minSdkVersion" value="8" />
in order to include Android 2.2
Related
I tried to build an cordova based android aplication, with "cordova-plugin-media" installed because I want my apps to be able to record my voice.
after the build success with no errors, I run the apps, the recording is working, but my apps become stuck.
The Cordova project was exported from Construct 2, and I've already checked the media permission on export. I've built the apps using SDK via CMD, and also add the "plugin-media" here.
before I add the plugin, the apps run well, but it can't record.
That's why I re-build it with plugin-media attached.
From the result export, I only edit the config.xml on my Cordova project.
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.mawar.speak" version="1.0.0.2" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Speech Platformer</name>
<description>
Aplication Description.
</description>
<author email="dummy#gmail.com" href="http://cordova.io">
Node.js
</author>
<content src="index.html" />
<plugin name="cordova-plugin-whitelist" spec="1" />
<access origin="*" />
<platform name="android">
<allow-intent href="market:*" />
</platform>
<!-- fullscreen -->
<preference name="Fullscreen" value="true" />
<!-- orientation -->
<preference name="Orientation" value="landscape" />
<engine name="android" spec="~7.1.1" />
</widget>
What I want is to make my apps run well with plugin-media installed. But when I build with it, it's stuck as I run it on my device.
Sorry for my bad english.
I am trying to build an offline app using cordova, I am using the sqlite plugin for storage. In my config.xml file i have added an entry, but when i build apk i am getting the error Error - The following plugin, plugin version or a dependancy of this plugin is not on npm: SQLitePlugin
how can i resolve this?
here is my config.xml
<?xml version="1.0" encoding="UTF-8" ?>
<widget xmlns = "http://www.w3.org/ns/widgets"
xmlns:gap = "http://phonegap.com/ns/1.0"
id = "com.plusminus.example"
versionCode = "10"
version = "1.0.0" >
<preference name="orientation" value="portrait" />
<name>DAPP</name>
<gap:plugin name="org.apache.cordova.camera" source="npm" />
<gap:plugin name="org.apache.cordova.device" source="npm" />
<gap:plugin name="cordova-plugin-whitelist" source="npm" />
<gap:plugin name="SQLitePlugin" value="io.liteglue.SQLitePlugin"/>
<author href="https://build.phonegap.com" email="aadd#xxxxxx.com">
xxxxxxxx
</author>
<icon src="/lib/images/AppIcon.png" />
<gap:platform name="android" />
<access origin="*" />
</widget>
I think you have to installed sqlite plugin via CLI.
Installed plugin by Just Open command prompt and go to your project path and install plugin using CLI
cordova plugin add https://github.com/brodysoft/Cordova-SQLitePlugin.git
For more helps to check here & If you want add the customized plugin used plugman for that please look to here..
Hopes this will help you !!.
Hello I have an app developed in phonegapbuild in version 3.7 and it works very well but if I upgrade to version cli-6.0.0 stops working.
this is my config is very simple.
<?xml version=”1.0″ encoding=”UTF-8″ ?>
<widget xmlns = “http://www.w3.org/ns/widgets”
xmlns:gap = “http://phonegap.com/ns/1.0″
id = “com.entre5.movil”
versionCode = “10″
version = “1.0.0″>
<name>Entre app</name>
<description>
Desarrollo personalizado ph
</description>
<author href=”https://phonegapspain.com” email=”soporte#phonegapspain.com”>
crecerweb
</author>
<preference name=”phonegap-version” value=”cli-6.0.0″ />
<preference name=”fullscreen” value=”false” />
<preference name=”prerendered-icon” value=”true” />
<content src=”index.html”/>
<platform name=”android”>
<icon src=”mdpi.png” qualifier=”ldpi”/>
<icon src=”hdpi.png” qualifier=”mdpi”/>
<icon src=”xhdpi.png” qualifier=”hdpi”/>
</platform>
<access origin=”*” />
</widget>
index.html
<script src=”phonegap.js”></script>
but does not work and you put a plugin like geolocalitation not it works is like no load something .
If suddenly someone already solved thank the guide.
regards
hello already solved and what happens is that after the clip 5 version to load jquery and other external files must be taken into account.
<gap:plugin name=”cordova-plugin-whitelist” source=”npm” />
<access origin=”*” />
<allow-intent href=”*” />
<allow-navigation href=”*” />
I would be glad if we had an example on how cordova plugins should be wrapped for CocoonJS.
I'm trying to use the device-orientation plugin (compass) in a simple example but after the app has initialized, the navigator.compass.getCurrentHeading() returns an CompassError with the code:
Class not found
The class name cannot be resolved correctly, so probably something's wrong with the config.xml file.
After combining many sources, mine looks like this:
../www/config.xml
<?xml version='1.0' encoding='utf-8'?>
<widget id="my.compass.html" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>HelloCordovaCompass</name>
<description>
A sample Apache Cordova application that displays the current compass heading after the deviceready event.
</description>
<author email="a#cordova.apache.org" href="http://cordova.io">
</author>
<content src="index.html" />
<access origin="*" />
<preference name="fullscreen" value="true" />
<preference name="orientation" value="landscape" />
<preference name="webviewbounce" value="true" />
<feature name="App">
<param name="android-package" value="org.apache.cordova.App" />
</feature>
<feature name="Compass">
<param name="android-package" value="org.apache.cordova.deviceorientation.CompassListener" />
</feature>
</widget>
I've also tried to include compass as plugin:
<plugin name="Compass" value="org.apache.cordova.device-orientation" />
with no difference..
PS: The app works fine on plain Cordova.
[UPDATE]
Maybe the problem is here:
For this example I zipped the <project-name>/platforms/android/assets/www folder.
I'm not sure if this is enough for a Cordova plugin app, as the native code of the plugin is not included (CompassListener.java) and the only part that seems to work is actually its JavaScript interface (compass.js, CompassError.js, etc)..
On the other hand, If I try to zip the whole <project-name> directory as pointed out at the bottom of this tutorial, the CocoonJS Launcher crashes..
So, could at least someone confirm that the launcher can actually compile Cordova plugins?
If you want to use plugins you have to zip all Cordova project folders. Example:
cd ~/projects/ && zip -r -X hellococoonfull.zip helloCocoonJS && cd -
See the section "Using Cordova Plugins" of Getting Started with Cordova and CocoonJS guide.
[Update]
The CocoonJS Launcher is not ready for plugins yet. For using plugins you have to use de cloud compilation system.
I have followed the very clear instructions on this page:
https://build.phonegap.com/docs/config-xml
I have included the following line in my config.xml file (which is indeed located at the top level of my app):
<preference name="fullscreen" value="true" />
And yet the status bar at the top of the screen remains.
Here is my full config.xml file if it helps..
<?xml version="1.0" encoding="UTF-8" ?>
<widget xmlns = "http://www.w3.org/ns/widgets"
xmlns:gap = "http://phonegap.com/ns/1.0"
id = "com.universeprojects.voidspace"
versionCode="10"
version = "0.1.2b">
<!-- versionCode is optional and Android only -->
<name>VoidSpace - DevServer</name>
<description>
This is a special version of VoidSpace that connects to the development server.
</description>
<author href="https://voidspace.ca" email="support#universeprojects.com">
Nikolas Gauvreau
</author>
<preference name="EnableViewportScale" value="true" />
<preference name="fullscreen" value="true" />
<preference name="webviewbounce" value="false" />
<icon src="icon.png" />
<gap:splash src="splash.png" />
</widget>
Any help is appreciated, thanks!
Just place your config.xml file, modified as you need, at the same directory, as the index.html file:
Note: in this case, we have our application built in the public/ dir. So all the stylesheets and javascripts are already compiled and placed within one.
And now just observe the magic!
Add <preference name="fullscreen" value="true" /> in this path:
res/xml/config.xml.
It really worked for me