Nice to Inform you that I’ve stated working on PhoneGap for my new BlackBerry Project.
To get first running project, it took lots of time. So I decided to post on this process.
Basically you should follow steps from this official site, But in my case, it was a different experience.
I prefer to use eclipse for each project, so here also we need eclipse.
Get the BlackBerry extension(here) and Web Work extension (here).
Now open eclipse, go to create new project, and selec BlackBerry Web Works project.
Type name, and then finish
After finishing, it prompt me this error
Press ok, To build a project you need to have project.properties file in your project directory, but it is not created, so you just copy this file from sample phoneGap project (available in phonegap zip)
Copy and paste above file into you project directory:
Just copy is not enough, you need to update the path for the BlackBerry WebWork Project EXE. Open this file in text editor, we need to update the path for bbwp.dir as we will compile this project in eclipse. New path should point to bbwp.exe file. To find this file, go to eclipse installation directory, then plugins, then look for the directory with the name “net.rim.browser.tools.wcpc”, and then wcpc.
Update the file with new path:
Now refresh you project, but hey, it still display this error 😦
Right click on you project, and open project properties, then select “Project facets”
REMOVE any selection if you find, (in my case, “Static web module” was selected).
Now this removes the error from our web work project, but our project still missing PhoneGap library.
First you need to build PhoneGap Web work project with ant build, and create a jar file. To do so please follow steps from here. Starting from the Ant installation to creation of sample project.
After building source code, you will get new files, as shown here:
Copy all these files and paste to you project directory. Over right files if exists.
Now refresh you project, and try to run it, This should work. Please see following file structure, each PhoneGap project should have these kind of structure.
After running this project, you should see PhoneGap sample application,
After closing this application in simulator, you can again find it in “Downloads”! I wasn’t knowing about this, and tried a lot to search where my app! Hope you don’t waste you time!!
Hurray!! Now just start creating HTML pages with jQuery Mobile and you can build good apps…
I’ll post more on BlackBerry Web Work + PhoneGap as I proceed. Enjoy mobilisum!
If you like my work, then please buy me a Coffee!