Wednesday 5 March 2014

PhoneGap Cordova BlackBerry RIM Configuration

Blackberry phonegap plugin setup:


http://phonegap.pbworks.com/w/page/31930982/Getting%20Started%20with%20PhoneGap%20BlackBerry%20WebWorks

Pre requriements softwares :
------------------------------
sun JDK1.6 upper : link here http://www.oracle.com/technetwork/java/javase/downloads/index.html#jdk

Apache : http://ant.apache.org/bindownload.cgi

Blackberry webwotrks sdk : https://developer.blackberry.com/html5/

phonegap : http://phonegap.com/download



Install Java SDK

IMPORTANT: Use the Sun JDK, not any other distribution.  Install JDK 1.6 or higher, 32-bit version.

Download the Sun JDK
Run the installer
Create a JAVA_HOME environment variable.
Open System Properties -> Advanced -> Environment Variables
Create a new system variable
Variable name: JAVA_HOME
Example value: C:\Program Files (x86)\Java\jdk1.6.0_21
Add %JAVA_HOME%\bin directory to the PATH system variable
Open System Properties -> Advanced -> Environment Variables
Under system variables, select PATH and append ;%JAVA_HOME%\bin
e.g. %SystemRoot%\system32;%SystemRoot%;%JAVA_HOME%\bin
Verify that Java is installed.

Open a new command window:

Start > Run, type in "cmd", and click OK.

C:\>java -version
java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_21-b07)
Java HotSpot(TM) Client VM (build 17.0-b17, mixed mode, sharing)


Run the PhoneGap Sample Application

This section describes the fastest way to run the PhoneGap sample application on a BlackBerry device simulator.  You will need Apache Ant to build the PhoneGap sample, and the BlackBerry WebWorks SDK to package, deploy, and test the application.

Install Apache Ant

Download Apache Ant  (Note: PhoneGap was developed using version Ant version 1.8.1).
Extract to a desired installation directory, e.g. C:\apache-ant
Create an ANT_HOME environment variable
Open System Properties -> Advanced -> Environment Variables
Create a new system variable
Variable name: ANT_HOME
Variable value: C:\apache-ant
Add %ANT_HOME%\bin directory to the PATH system variable
Open System Properties -> Advanced -> Environment Variables
Under system variables, select PATH and append ;%ANT_HOME%\bin
e.g. %SystemRoot%\system32;%SystemRoot%;%JAVA_HOME%\bin;%ANT_HOME%\bin
Verify that ANT is installed.

Open a new command window and type:

C:\>ant -v
Apache Ant version 1.8.1 compiled on April 30 2010
Trying the default build file: build.xml
Buildfile: build.xml does not exist!
Build failed


Install the BlackBerry WebWorks SDK

Download the latest version of the BlackBerry WebWorks SDK.
Run the BlackBerry WebWorks SDK installer.  It is recommended to install to a directory that contains no spaces, e.g. C:\BBWP.

/// or install in default set up c:\program file\Research in motion\bB

Download PhoneGap

Download the latest stable release of PhoneGap
Select the Downloads button on the upper right.
Select the Download.zip button and save the archive file to a temporary directory.
Unzip the contents of the archive file to a working directory,  e.g. C:\Dev\phonegap-1.3.0


GOTO F:\sample (phonegap app)  in cmd ( phonegap sample project\\ double C:\\pgr file\\BBWP\\)
 
cmd:>ant blackberry build
cmd:>ant blackberry load-simulator
cmd:>ant blackberry load-device

Build the PhoneGap Sample Application Project

Open a command window.

Start > Run, then type "cmd" without the quotes.  Click OK.

Change to the PhoneGapBlackBerry\WebWorks directory:
F:\sample


project  file: modifications

blackberry.bbwp.dir=C:\\Program Files\\Research In Motion\\BlackBerry WebWorks SDK 2.3.1.5


blackberry.sim.dir=C:\\Program Files\\Research In Motion\\BlackBerry WebWorks SDK 2.3.1.5\\simpack\\7.0.0.318

#blackberry.sim.bin=9930.bat


     3. Specify the BlackBerry WebWorks Packager installation directory, bbwp.dir, in the project.properties file.  Open the file using a text editor, and set the bbwp.dir path to where you installed BBWP.

     blackberry.bbwp.dir=C:\Program Files\Research In Motion\BlackBerry WebWorks SDK 2.3.1.5

          Note: be sure to escape the backslashes in the directory path.

     4. Return to the command window and build the PhoneGap sample project:

    C:\Dev\phonegap-1.7.0\phonegap-1.7.0\BlackBerry-WebWorks\sample>ant blackberry build
    Buildfile: C:\Dev\bbw\sample\build.xml

    generate-cod-name:
         [echo] Generated name: PhoneGapSample.cod

    clean:
       [delete] Deleting directory C:\bbw\sample\build

    package-app:
        [mkdir] Created dir: C:\Dev\phonegap-1.7.0\phonegap-1.7.0\BlackBerry-WebWorks\sample\build\widget
         [copy] Copying 8 files to C:\Dev\phonegap-1.7.0\phonegap-1.7.0\BlackBerry-WebWorks\sample\build\widget
          [zip] Building zip: C:\Dev\phonegap-1.7.0\phonegap-1.7.0\BlackBerry-WebWorks\sample\build\PhoneGapSample.zip

    build:
         [exec] [INFO]                      Parsing command line options
         [exec] [INFO]                      Parsing bbwp.properties
         [exec] [INFO]                      Validating widget archive
         [exec] [INFO]                      Parsing config.xml
         [exec] [WARNING]                   Failed to find the <author> element
         [exec] [INFO]                      Populating widget source
         [exec] [INFO]                      Compiling widget
         [exec] [INFO]                      Generating output files
         [exec] [INFO]                      Widget packaging complete

    BUILD SUCCESSFUL
    Total time: 7 seconds

Run the PhoneGap Sample Application in a Simulator

Use the ant build script in the PhoneGap project directory to run the PhoneGap sample application in the simulator of your choice.  By default, the build script will choose the first simulator it finds within the BlackBerry WebWorks Packager directory.  You can override this behavior and specify which simulator to use by editing the project.properties file within the project directory.

Run the PhoneGap sample in BlackBerry smartphone simulator:

C:\Dev\phonegap-1.7.0\phonegap-1.7.0\BlackBerry-WebWorks\sample>ant blackberry load-simulator            

 On the simulator, click the BlackBerry icon and go to the Downloads folder. You will see the PhoneGap sample app listed there.


[Optional] Run the PhoneGap sample in a user-defined BlackBerry simulator.  Edit the project.properties file. In this case, we specify the simulator running BlackBerry OS 6.0 (Torch 9800) that comes installed with the BlackBerry WebWorks Packager.  When finished, repeat steps 1 and 2.

un the PhoneGap Sample Application on a Device

Use the ant build script in the PhoneGap project directory to run the PhoneGap sample application on a BlackBerry device that is connected via USB. In order to use the application on a device, you must code-sign the application. This is similar to Apple's provisioning profile.

Request a code-signing keys from Research in Motion (Web Form). Once processed, an email will describe how to install the keys to your WebWorks SDK.
Run the PhoneGap sample on BlackBerry smartphone device:

C:\Dev\phonegap-1.7.0\phonegap-1.7.0\BlackBerry-WebWorks\sample>ant blackberry load-device            

On the device, click the BlackBerry icon and go to the Downloads folder. You will see the PhoneGap sample app listed there.
[Optional] Save your code signing password.  Edit the project.properties file. In this case, we specify the signing tool password:

# Code Signing Password
#
#   If you leave this field blank, then
#   the signing tool will prompt you each time
#
sigtool.password=mysecretpassphrase


Before the step bb sign keyy need
make pin number
pin no:ksapon123
reply mail
3 files RRC,RTC,RCC
download and save any folder

To get sign in tool 2 files
cmd: cd BBWP\bin
enter
Bin\ java -jar SignatureTool.jar
enter
goto singkey folder in cmd:
CMD:\singkey\1file enter
2 file
3file
enter
look ur BBWP it show singtool,another file for sing

No comments:

Post a Comment