forked from sintaxi/phonegap
/
guide_getting-started_blackberry_index.md.html
256 lines (239 loc) · 13.5 KB
/
guide_getting-started_blackberry_index.md.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
<!DOCTYPE html>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
--><html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width">
<meta name="generator" content="joDoc">
<title>Apache Cordova API Documentation</title>
<link rel="stylesheet" type="text/css" href="index.css">
<link rel="stylesheet" type="text/css" href="mobile.css" media="only screen and (max-device-width: 1024px)">
<link rel="stylesheet" type="text/css" href="prettify/prettify.css">
</head>
<body>
<div id="header">
<h1><a href="index.html">Apache <strong>Cordova</strong> Documentation</a></h1>
<small>
<select><optgroup label="English" value="en">
<option value="edge">edge</option>
<option selected value="1.8.1">1.8.1</option>
<option value="1.8.0rc1">1.8.0rc1</option>
<option value="1.8.0">1.8.0</option>
<option value="1.7.0rc1">1.7.0rc1</option>
<option value="1.7.0">1.7.0</option>
<option value="1.6.1">1.6.1</option>
<option value="1.6.0rc1">1.6.0rc1</option>
<option value="1.6.0">1.6.0</option>
<option value="1.5.0rc1">1.5.0rc1</option>
<option value="1.5.0">1.5.0</option>
<option value="1.4.1">1.4.1</option>
<option value="1.4.0rc1">1.4.0rc1</option>
<option value="1.4.0">1.4.0</option>
<option value="1.3.0">1.3.0</option>
<option value="1.2.0">1.2.0</option>
<option value="1.1.0">1.1.0</option>
<option value="1.0.0rc3">1.0.0rc3</option>
<option value="1.0.0rc2">1.0.0rc2</option>
<option value="1.0.0rc1">1.0.0rc1</option>
<option value="1.0.0">1.0.0</option>
<option value="0.9.6">0.9.6</option>
<option value="0.9.5.1">0.9.5.1</option>
<option value="0.9.5">0.9.5</option>
<option value="0.9.4">0.9.4</option>
<option value="0.9.3">0.9.3</option>
<option value="0.9.2">0.9.2</option>
</optgroup>
<optgroup label="Español" value="es"><option value="1.0.0">1.0.0</option></optgroup>
<optgroup label="Français" value="fr">
<option value="1.3.0">1.3.0</option>
<option value="1.2.0">1.2.0</option>
<option value="1.1.0">1.1.0</option>
</optgroup>
<optgroup label="Japanese" value="jp"><option value="0.9.5">0.9.5</option></optgroup></select></small>
</div>
<div id="subheader">
<h1>Getting Started with Blackberry</h1>
<small><select><option value="Getting%2520Started%2520with%2520Blackberry">Getting Started with Blackberry</option>
<option value="Getting%20Started%20with%20Blackberry_1_requirements"> - 1. Requirements</option>
<option value="Getting%20Started%20with%20Blackberry_2_install_sdk_cordova"> - 2. Install SDK + Cordova</option>
<option value="Getting%20Started%20with%20Blackberry_3_setup_new_project"> - 3. Setup New Project</option>
<option value="Getting%20Started%20with%20Blackberry_4_hello_world"> - 4. Hello World</option>
<option value="Getting%20Started%20with%20Blackberry_5a_deploy_to_simulator"> - 5A. Deploy to Simulator</option>
<option value="Getting%20Started%20with%20Blackberry_5b_deploy_to_device_windows_and_mac"> - 5B. Deploy to Device (Windows and Mac)</option>
<option value="Getting%20Started%20with%20Blackberry_additional_information"> - Additional Information</option></select></small>
</div>
<div id="sidebar">
<div class="vertical_divider"></div>
<h1>API Reference</h1>
<ul>
<li><a href="cordova_accelerometer_accelerometer.md.html#Accelerometer">Accelerometer</a></li>
<li><a href="cordova_camera_camera.md.html#Camera">Camera</a></li>
<li><a href="cordova_media_capture_capture.md.html#Capture">Capture</a></li>
<li><a href="cordova_compass_compass.md.html#Compass">Compass</a></li>
<li><a href="cordova_connection_connection.md.html#Connection">Connection</a></li>
<li><a href="cordova_contacts_contacts.md.html#Contacts">Contacts</a></li>
<li><a href="cordova_device_device.md.html#Device">Device</a></li>
<li><a href="cordova_events_events.md.html#Events">Events</a></li>
<li><a href="cordova_file_file.md.html#File">File</a></li>
<li><a href="cordova_geolocation_geolocation.md.html#Geolocation">Geolocation</a></li>
<li><a href="cordova_media_media.md.html#Media">Media</a></li>
<li><a href="cordova_notification_notification.md.html#Notification">Notification</a></li>
<li><a href="cordova_storage_storage.md.html#Storage">Storage</a></li>
</ul>
<h1>Guides</h1>
<ul>
<li><a href="guide_getting-started_index.md.html#Getting%20Started%20Guides">Getting Started Guides</a></li>
<li><a href="guide_upgrading_index.md.html#Upgrading%20Guides">Upgrading Guides</a></li>
<li><a href="guide_whitelist_index.md.html#Domain%20Whitelist%20Guide">Domain Whitelist Guide</a></li>
<li><a href="_index.html">Keyword Index</a></li>
</ul>
</div>
<div id="scrollable">
<div id="content">
<h1><a name="Getting%20Started%20with%20Blackberry">Getting Started with Blackberry</a></h1>
<p>Cordova for BlackBerry makes use of the <a class="external" href="https://bdsc.webapps.blackberry.com/html5">BlackBerry WebWorks framework</a>. BlackBerry WebWorks tooling is available for Windows or Mac environments. WebWorks applications can ONLY be deployed to BlackBerry devices running OS 5.0 and higher or the BlackBerry PlayBook operating system.</p>
<h2>
<a name="Getting%20Started%20with%20Blackberry_1_requirements">1. Requirements</a>
</h2>
<ul>
<li>Windows XP (32-bit) or Windows 7 (32-bit and 64-bit) or Mac OSX 10.6.4+</li>
<li>Java Development Kit (JDK)
<ul>
<li>Windows: <a class="external" href="http://www.oracle.com/technetwork/java/javase/downloads/index.html#jdk">Oracle JDK</a> (32-Bit Version)</li>
<li>Mac OS X: Versions prior to Mac OS X 10.7 provided Java by default. OS X 10.7+ requires installation of <a class="external" href="http://support.apple.com/kb/DL1421">Java</a>.</li>
</ul>
</li>
<li>Apache Ant
<ul>
<li>Windows: <a class="external" href="http://ant.apache.org/bindownload.cgi">Apache Ant</a>.</li>
<li>Mac OS X: Apache Ant is bundled with Java install.</li>
</ul>
</li>
</ul>
<h2>
<a name="Getting%20Started%20with%20Blackberry_2_install_sdk_cordova">2. Install SDK + Cordova</a>
</h2>
<ul>
<li>PlayBook development requires the <a class="external" href="http://www.adobe.com/devnet/air/air-sdk-download.html">Adobe Air SDK</a>
</li>
<li>Download and install one or more of the WebWorks SDKs. Keep note of the install directory.
<ul>
<li>Smartphone Development: <a class="external" href="https://bdsc.webapps.blackberry.com/html5/download/sdk">BlackBerry WebWorks Smartphone SDK</a>
</li>
<li>PlayBook Development: <a class="external" href="https://bdsc.webapps.blackberry.com/html5/download/sdk">BlackBerry WebWorks Tablet OS SDK</a>
</li>
</ul>
</li>
<li>Download the latest copy of <a class="external" href="http://phonegap.com/download">Cordova</a> and extract its contents.</li>
</ul>
<h2>
<a name="Getting%20Started%20with%20Blackberry_3_setup_new_project">3. Setup New Project</a>
</h2>
<ul>
<li>Open up a command prompt/terminal and navigate to where you extracted Cordova.</li>
<li>There is a directory for each platform that Cordova supports. CD into the blackberry directory.</li>
<li>The blackberry directory contains two directories, <code>sample</code> and <code>www</code>. The <code>sample</code> folder contains a complete Cordova project. Copy the <code>sample</code> folder to another location on your computer.</li>
<li>Change to the newly created directory.</li>
<li>Open up the project.properties file with your favorite editor and edit the entries for <code>blackberry.bbwp.dir=</code> and/or <code>playbook.bbwp.dir=</code>. Set the value(s) to the directory containing the <code>bbwp</code> binary in the WebWorks SDK(s) installed earlier.</li>
</ul>
<h2>
<a name="Getting%20Started%20with%20Blackberry_4_hello_world">4. Hello World</a>
</h2>
<p>Build the Cordova sample project by typing <code>ant target build</code> in your command prompt/terminal while you are in your project's directory. Replace <code>target</code> with either <code>blackberry</code> or <code>playbook</code>. Note this is a sample Cordova project and not a basic hello world application. The provided index.html in the www contains example usages of many of the Cordova API.</p>
<h2>
<a name="Getting%20Started%20with%20Blackberry_5a_deploy_to_simulator">5A. Deploy to Simulator</a>
</h2>
<p>BlackBerry smartphone simulators are only available on Windows. PlayBook simulators require VMWare Player (Windows) or VMWare Fusion (Mac OS X). The WebWorks SDK provides a default simulator. Additional simulators are <a class="external" href="http://us.blackberry.com/developers/resources/simulators.jsp">available</a>.</p>
<ul>
<li>Open the project.properties file with your favorite editor and customize the following properties.
<ul>
<li>Smartphone (Optional)
<ul>
<li>
<code>blackberry.sim.dir</code> : Path to directory containing simulator. On windows file separator '\' must be escaped '\\'.</li>
<li>
<code>blackberry.sim.bin</code> : Name of the simulator executable in the specified directory.</li>
</ul>
</li>
<li>Playbook
<ul>
<li>
<code>playbook.sim.ip</code> : IP address of simulator obtained when placing the simulator in developer mode through simulator security settings.</li>
<li>
<code>playbook.sim.password</code> : Simulator password which can be set through simulator security settings.</li>
</ul>
</li>
</ul>
</li>
<li>While in your project directory, in command prompt/terminal type <code>ant target load-simulator</code>. Replace <code>target</code> with either <code>blackberry</code> or <code>playbook</code>. Note, for PlayBook the simulator virtual image must already be started.</li>
<li>The application will be installed in the All Applications section in the simulator. Note, on BlackBerry OS 5 the application is installed in the Downloads folder.</li>
</ul>
<h2>
<a name="Getting%20Started%20with%20Blackberry_5b_deploy_to_device_windows_and_mac">5B. Deploy to Device (Windows and Mac)</a>
</h2>
<ul>
<li>Deploying to a device requires signing keys which can be obtained from RIM.
<ul>
<li>Fill out this <a class="external" href="https://bdsc.webapps.blackberry.com/html5/signingkey">form</a>. to request signing keys.</li>
<li>Install the signing keys once they have been received:
<ul>
<li><a class="external" href="https://bdsc.webapps.blackberry.com/html5/documentation/ww_publishing/signing_setup_smartphone_apps_1920010_11.html">Setup Smartphone Signing keys</a></li>
<li><a class="external" href="https://bdsc.webapps.blackberry.com/html5/documentation/ww_publishing/signing_setup_tablet_apps_1920009_11.html">Setup Tablet Signing keys</a></li>
</ul>
</li>
</ul>
</li>
<li>Install <a class="external" href="http://us.blackberry.com/apps-software/desktop/">BlackBerry Desktop Sofware</a> to be able to install a signed application to a smartphone device attached via USB.</li>
<li>Open the project.properties file with your favorite editor and customize the following properties:
<ul>
<li>Smartphone (Optional)
<ul>
<li>
<code>blackberry.sigtool.password</code> : Password used when code signing keys were registered. If not specified, a prompt will occur.</li>
</ul>
</li>
<li>Playbook (Required)
<ul>
<li>
<code>playbook.sigtool.csk.password</code> : Signing key password.</li>
<li>
<code>playbook.sigtool.p12.password</code> : Signing key password.</li>
<li>
<code>playbook.device.ip</code> : IP address of device obtained when placing the device in developer mode through device security settings.</li>
<li>
<code>playbook.device.password</code> : <a href="cordova_device_device.md.html#Device">Device</a> password which is set through device security settings.</li>
</ul>
</li>
</ul>
</li>
<li>While in your project directory, in command prompt/terminal type <code>ant target load-device</code>. Replace <code>target</code> with either <code>blackberry</code> or <code>playbook</code>.</li>
<li>The application will be installed in the All Applications section in the device. Note, on BlackBerry OS 5 the application is installed in the Downloads folder.</li>
</ul>
<h2>
<a name="Getting%20Started%20with%20Blackberry_additional_information">Additional Information</a>
</h2>
<p>The following articles provide help to issues you may encounter when developing a Cordova application which is based on the BlackBerry WebWorks framework.</p>
<ul>
<li><a class="external" href="http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/Common-BlackBerry-WebWorks-development-pitfalls-that-can-be/ta-p/624712">BlackBerry WebWorks Development Pitfalls</a></li>
<li><a class="external" href="https://bdsc.webapps.blackberry.com/html5/documentation/ww_developing/bestpractice_compiling_ww_apps_1873324_11.html">Best practices for packaging WebWorks applications</a></li>
</ul>
</div>
</div>
<!-- Functionality and Syntax Highlighting -->
<script type="text/javascript" src="index.js"></script><script type="text/javascript" src="prettify/prettify.js"></script>
</body>
</html>