So I'm back and have somehow fixed the issue I had (most likely by luck). When I started this project, I thought the best approach would be make this application as modular as possible; each functionality (web requests, file reading/writing, etc.) to be separated from one another. Thus I created lots of separate js files, each tagged with the appropriate name (network, device, language, etc.), and then included them in my index.
Html page which is then ran by phonegap.
Up vote 3 down vote favorite share g+ share fb share tw.
My issue is regarding PhoneGap and Android development using the Eclipse Applaud plugin. I downloaded and installed the Applaud plugin successfully. I can create a new project using the Applaud wizard (via the Eclipse toolbar icon), and the demo runs on the device fine.
However, when I overwrite the existing html & js (only main. Js, not phonegap. Js) files, then build it to the device, the non device functionality works fine (button clicks/ui update/etc), but the PhoneGap commands such as (device.
Version/device. Platform/etc) does not seem to work. I have tried hooking this into the onDeviceReady event as well as making sure the .
Jar library is included, but I still have the same issue. So I guess my question is; when creating a PhoneGap solution using Applaud, does Eclipse need to compile and library, such as PhoneGap? And if so, how could someone go about doing such things?
Error Log: 01-24 14:59:44.567: W/KeyCharacterMap(5453): No keyboard for id 131074 01-24 14:59:44.567: W/KeyCharacterMap(5453): Using default keymap: /system/usr/keychars/qwerty.kcm. Bin 01-24 14:59:59.917: I/Web Console(5453): Failed to run constructor: TypeError: object is not a function at file:///android_asset/www/resources/js/phonegap-1.3.0. Js:210 01-24 14:59:59.927: I/Web Console(5453): Failed to run constructor: TypeError: Cannot read property 'capture' of undefined at file:///android_asset/www/resources/js/phonegap-1.3.0.
Js:210 01-24 14:59:59.927: I/Database(5453): sqlite returned: error code = 14, msg = cannot open file at source line 25467 01-24 15:00:00.057: D/dalvikvm(5453): GC_CONCURRENT freed 1185K, 55% free 3188K/6983K, external 2630K/2814K, paused 2ms+3ms android eclipse phonegap phonegap-plugins applaud link|improve this question edited 01-247 at 15:17palacsint4,6662421 asked 01-247 at 10:43JohnHodkinson1338 75% accept rate.
Did you add the plugin to the plugins. Xml file? – ghostCoder Jan 24 at 12:47 is the onDeviceReady event being fired?
– ghostCoder Jan 24 at 12:47 Yes, also the plugin file is in root/res/plugins.xml.. I've log cat the device while running and I seem to get the following output: I/Web Console(4894): Failed to run constructor: TypeError: object is not a function at file:///android_asset/www/resources/js/phonegap-1.3.0. Js:210I/Web Console(5109): Failed to run constructor: TypeError: Cannot read property 'capture' of undefined at file:///android_asset/www/resources/js/phonegap-1.3.0. Js:210 I/Database(5109): sqlite returned: error code = 14, msg = cannot open file at source line 25467 – JohnHodkinson Jan 24 at 14:15 I've tried looking around for any references to 'capture', but I can't seem to find anything.
I thought this may be when asking for capture permissions but I can't see anywhere where this is specified. – JohnHodkinson Jan 24 at 14:23 sqlite error is ok. Comes now n then.
Can you post the full logs in your question? – ghostCoder Jan 24 at 14:34.
So I'm back and have somehow fixed the issue I had (most likely by luck). When I started this project, I thought the best approach would be make this application as modular as possible; each functionality (web requests, file reading/writing, etc.) to be separated from one another. Thus I created lots of separate js files, each tagged with the appropriate name (network, device, language, etc.), and then included them in my index.
Html page which is then ran by phonegap. In some of these files, I took the following approach: var Device = { // Returns the Device Name as a string. Name: function() { return window.device.
Name; } }; As a result, I could then access this functionality using the dot operator (which I prefer). However by doing so, resulted in many files relying one on another, making it difficult to track down my issue. After spending some time commenting and un-commenting functionality, It seems by using a combination of the above approach (dot operator) and my bad choice of naming conventions.
The Device.Name() implementation above seemed to (not entirely certain on why/how) conflict with the PhoneGap libraries, consequently resulting in js errors on the device. After changing the above name from "Device" to "Handset", my issue went away. A simple and maybe obvious solution to a painful afternoon.
Listen I just had the same problem. When you either import a project or make a new one the script tag to load the phonegap js api is commneted out. Just incase you do not need it.
You just have to uncomment that line. – Mike L. Feb 20 at 13:27.
I'll answer your question, but I don't think it is your problem: Whether or not the AppLaud wizard just uses phonegap. Jar or rebuilds its components depends upon how you use the project creation wizard. If you use its "Built-in Phonegap" or point at a downloaded official release ("Enter path to installed PhoneGap"), it will just point at the phonegap.
Jar from that release. If you point at a directory with an unzipped github PhoneGap version, phonegap. Jar will not be used and the PhoneGap Java sources will be built into your project.
This makes for easy debugging of the PhoneGap implementation. Regarding your problem, you likely have something wrong with your index. Html file, like a misspelling of phonegap{...}.js.
As ghostCoder says in the comments, you may need to share your code to get help on it.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.