09-14-2012 10:43 AM
Hello,
I'm trying to develop my first client/server app on Blackberry.
I decided to use phonegap as apparently it would allow me to deploy that same app on different platforms.
I'm starting with BB as this is the device primarely used in our company.
The phonegap manual states that I have to launch a command: ant blackberry load-simulator
The simulator is loaded but the application is not there.
I suspect the cod file is not being generated, could you help me understand what did I do wrong?
Thanks,
Roberto.
09-15-2012 06:02 AM
What program are you using to develop in? (editor)
Are you using an emulator to test your apps?
Did you run any kind of compile? I'm not familiar with phonegap and how it builds apps... is that command the one that builds the app, or deploys the app to the simulator?
09-15-2012 05:04 PM - edited 09-15-2012 05:06 PM
Hello Roberto,
Indeed, if you could let us know a bit more which tools en development enviroments you might be using to create your PhoneGap app, we might be able to help out a little more.
It's worth a try to reenter the command after the simulator has started. In many cases the simulator takes so long to start that the program trying to uplaod the app has already stopped trying.
Reentering it would probably see the simulator already running and start deploying straight away.
If no .cod or .jad files can be foudn on your system, most likely not created. In that case you need to inspect more on the side of PhoneGap itself and less BlackBerry.
For a simulator no signing is required so you should be able to compelte it without getting your signing keys from RIM.
But to succesfully compile on a stand alone computer (e.g. Not using PhoneGap Build) you will need to install some binaries of BlackBerry, before you can succesfully compile an application to a cod/jad executable.
Hope this helps a bit.
p.p.s We're you succesful to create your hello world, using the getting started guide from PhoneGap: http://docs.phonegap.com/en/2.0.0/guide_getting-st
If that works you should be golden.
09-15-2012 05:07 PM
Hello,
thanks for answering...
For the moment I haven't developed anything yet. I'm just trying to load the "hello world" program.
I do use the BB simulators (I tried the Bold 9900 and 9700).
ANT blackberry load-simulator is the command I'm told to execute in order to build and load the app in the simulator.
unfortunately whilst the simulator loads fine, the app is not there.
P.S.: PhoneGap is a framework that supposedly allows to develop multi-platform html5-based apps.
Here is the document I followed: http://docs.phonegap.com/en/2.0.0/guide_getting-st
Thanks again for your interest.
09-15-2012 05:58 PM
Is there any else mentionned by the command line about waht it has been doing ?
I've used PhoneGap extensively (iOS, Android), but to be honost not for BlackBerry a lot. as I just port my HTML5 code into WebWorks from my PhoneGap project. I'm quite familiar with WebWorks and it has been easier and allowed me to have sometimes a bit more integration into the BlackBerry Platform.
Both FrameWorks are very much alike. If you're just Building a WebApp without any of the 'native' calls of PhoneGap, you can also just use WebWorks to compile your application. It would just be pointing to the right frameworks in Ripple.
But to gather a little more experience I'll try to take the time to also do the PhoneGap deployment for BlackBerry and let you know my results.
09-16-2012 01:27 PM
Hello,
Thanks again for your interest, please see below the outcome of the ant command.
The solution you proposed for WebWorks sounds interesting: do you have any "getting started" document if possible with some references on how to consume webservices?
C:\Program Files (x86)\Cordova\lib\blackberry\sample>ant blackberry load-simulator
Buildfile: C:\Program Files (x86)\Cordova\lib\blackberry\sample\build.xml
blackberry:
load-simulator:
generate-cod-name:
[echo] Generated name: cordovaExample.cod
clean:
[delete] Deleting directory C:\Program Files (x86)\Cordova\lib\blackberry\sample\build
package-app:
[mkdir] Created dir: C:\Program Files (x86)\Cordova\lib\blackberry\sample\build\widget
[copy] Copying 8 files to C:\Program Files (x86)\Cordova\lib\blackberry\sample\build\widget
[mkdir] Created dir: C:\Program Files (x86)\Cordova\lib\blackberry\sample\build\Standard
[zip] Building zip: C:\Program Files (x86)\Cordova\lib\blackberry\sample\build\cordovaE
build:
[exec]
[exec] C:\Program Files (x86)\Cordova\lib\blackberry\sample>"C:\Program Files (x86)\Research In Motion\BlackBerry 10 WebWorks SDK 1.0.1.17\dependencies\node\node.exe" "C:\Program Files (x86)\Research In Motion\BlackBerry 10 WebWorks SDK 1.0.1.17\lib\bbwp.js" "C:\Program Files (x86)\Cordova\lib\blackberry\sample\build\cordovaE
[exec] [INFO] Populating application source
[exec] [INFO] Parsing config.xml
[exec] [ERROR] Error: Please enter an author for the application
load-simulator:
[echo] Simulator directory=C:\Program Files (x86)\Research In Motion\BlackBerry Smartphone Simulators 7.1.0\7.1.0.98 (9900)
[echo] Simulator directory=C:\Program Files (x86)\Research In Motion\BlackBerry Smartphone Simulators 7.1.0\7.1.0.98 (9900)
[echo] Simulator executable=C:\Program Files (x86)\Research In Motion\BlackBerry Smartphone Simulators 7.1.0\7.1.0.98 (9900)/9900.bat
[echo] Closing all running simulators...
[exec] No sessions currently running.
[exec] Result: 1
[echo] MDS directory=C:\Program Files (x86)\Research In Motion\BlackBerry Email and MDS Services Simulators 4.1.2\MDS
BUILD SUCCESSFUL
Total time: 19 seconds
09-17-2012 05:11 AM
I dont' see any particular erros in the ant command.
But there is the author element missing in the generated config.xml for the webworks packager.
As I don't have to much experience with the BlackBerry Packager for PhoneGap, I don't kmow what might go wrong.
If you want to consume webservcies in your PhoneGap app. Its just the same as normal WebServices. just use Ajax/XHR reuqests to pul them in and an XML or JSON parser to generate your HTML.
If you're also new to web development try w3cschools.com and try the examples there to learn more about them.
09-17-2012 08:21 AM
Hello,
Just curious if after building, you go to the directory "C:\Program Files (x86)\Cordova\lib\blackberry\sample\build\StandardInstall" are there any files in there?
09-17-2012 10:10 AM
Nope, that folder is empty.
Do you know if I have to purchase something before being able to compile projects?
Thanks,
Roberto.
09-17-2012 11:44 AM
have you set up signing keys?