blob: decfd26acf1c5e3e6c1daca6ea3703a512fb9ca5 [file] [log] [blame]
Robert Lya4d2d0e2013-04-09 11:26:12 -07001<?cs include:"doctype.cs" ?>
2<?cs include:"macros.cs" ?>
3<html<?cs if:devsite ?> devsite<?cs /if ?>>
4<?cs if:sdk.redirect ?>
5 <head>
6 <title>Redirecting...</title>
7 <meta http-equiv="refresh" content="0;url=<?cs var:toroot ?>sdk/<?cs
8 if:sdk.redirect.path ?><?cs var:sdk.redirect.path ?><?cs
9 else ?>index.html<?cs /if ?>">
10 </head>
11<?cs else ?>
12 <?cs include:"head_tag.cs" ?>
13<?cs /if ?>
14<body class="gc-documentation
15 <?cs if:(guide||develop||training||reference||tools||sdk) ?>develop<?cs
16 elif:design ?>design<?cs
17 elif:distribute ?>distribute<?cs
18 /if ?>" itemscope itemtype="http://schema.org/CreativeWork">
19 <a name="top"></a>
20<?cs include:"header.cs" ?>
21
22
23<div <?cs if:fullpage
24?><?cs else
25?>class="col-13" id="doc-col"<?cs /if ?> >
26
27<?cs if:sdk.redirect ?>
28
29<div class="g-unit">
30 <div id="jd-content">
31 <p>Redirecting to
32 <a href="<?cs var:toroot ?>sdk/<?cs
33 if:sdk.redirect.path ?><?cs var:sdk.redirect.path ?><?cs
34 else ?>index.html<?cs /if ?>"><?cs
35 if:sdk.redirect.path ?><?cs var:sdk.redirect.path ?><?cs
36 else ?>Download the SDK<?cs /if ?>
37 </a> ...</p>
38
39<?cs else ?>
40<?cs # else, if NOT redirect ...
41#
42#
43# The following is for SDK/NDK pages
44#
45#
46?>
47
48<?cs if:header.hide ?><?cs else ?>
49<h1 itemprop="name"><?cs var:page.title ?></h1>
50<?cs /if ?>
51 <div id="jd-content" itemprop="description">
52
53<?cs if:sdk.not_latest_version ?>
54 <div class="special">
55 <p><strong>This is NOT the current Android SDK release.</strong></p>
56 <p><a href="/sdk/index.html">Download the current Android SDK</a></p>
57 </div>
58<?cs /if ?>
59
60
61<?cs if:ndk ?>
62<?cs #
63#
64#
65#
66#
67#
68#
69# the following is for the NDK
70#
71# (nested in if/else redirect)
72#
73#
74#
75#
76?>
77
78 <table class="download" id="download-table">
79 <tr>
80 <th>Platform</th>
81 <th>Package</th>
82 <th>Size</th>
83 <th>MD5 Checksum</th>
84 </tr>
85 <tr>
86 <td>Windows</td>
87 <td>
88 <a onClick="return onDownload(this)"
89 href="http://dl.google.com/android/ndk/<?cs var:ndk.win_download ?>"><?cs var:ndk.win_download ?></a>
90 </td>
91 <td><?cs var:ndk.win_bytes ?> bytes</td>
92 <td><?cs var:ndk.win_checksum ?></td>
93 </tr>
94 <tr>
95 <td>Mac OS X (intel)</td>
96 <td>
97 <a onClick="return onDownload(this)"
98 href="http://dl.google.com/android/ndk/<?cs var:ndk.mac_download ?>"><?cs var:ndk.mac_download ?></a>
99 </td>
100 <td><?cs var:ndk.mac_bytes ?> bytes</td>
101 <td><?cs var:ndk.mac_checksum ?></td>
102 </tr>
103 <tr>
104 <td>Linux 32/64-bit (x86)</td>
105 <td>
106 <a onClick="return onDownload(this)"
107 href="http://dl.google.com/android/ndk/<?cs var:ndk.linux_download ?>"><?cs var:ndk.linux_download ?></a>
108 </td>
109 <td><?cs var:ndk.linux_bytes ?> bytes</td>
110 <td><?cs var:ndk.linux_checksum ?></td>
111 </tr>
112 </table>
113
114 <?cs ######## HERE IS THE JD DOC CONTENT ######### ?>
115 <?cs call:tag_list(root.descr) ?>
116
117
118
119<script>
120 function onDownload(link) {
121
122 $("#downloadForRealz").html("Download " + $(link).text());
123 $("#downloadForRealz").attr('href',$(link).attr('href'));
124
125 $("#tos").fadeIn('slow');
126
127 location.hash = "download";
128 return false;
129 }
130
131
132 function onAgreeChecked() {
133 if ($("input#agree").is(":checked")) {
134 $("a#downloadForRealz").removeClass('disabled');
135 } else {
136 $("a#downloadForRealz").addClass('disabled');
137 }
138 }
139
140 function onDownloadNdkForRealz(link) {
141 if ($("input#agree").is(':checked')) {
142 $("#tos").fadeOut('slow');
143
144 $('html, body').animate({
145 scrollTop: $("#Installing").offset().top
146 }, 800, function() {
147 $("#Installing").click();
148 });
149
150 return true;
151 } else {
152 $("label#agreeLabel").parent().stop().animate({color: "#258AAF"}, 200,
153 function() {$("label#agreeLabel").parent().stop().animate({color: "#222"}, 200)}
154 );
155 return false;
156 }
157 }
158
159 $(window).hashchange( function(){
160 if (location.hash == "") {
161 location.reload();
162 }
163 });
164
165</script>
166
167 <?cs else ?>
168<?cs # end if NDK ...
169#
170#
171#
172#
173#
174#
175# the following is for the SDK
176#
177# (nested in if/else redirect and if/else NDK)
178#
179#
180#
181#
182?>
183 <?cs if:android.whichdoc == "online" ?>
184
185
186<?cs ######## HERE IS THE JD DOC CONTENT FOR ONLINE ######### ?>
187<?cs call:tag_list(root.descr) ?>
188
189
190
191
192<h4><a href='' class="expandable"
193 onclick="toggleExpandable(this,'.pax');hideExpandable('.myide,.reqs');return false;"
194 >DOWNLOAD FOR OTHER PLATFORMS</a></h4>
195
196
197<div class="pax col-13 online" style="display:none;margin:0;">
198
199
200<p class="table-caption"><strong>ADT Bundle</strong></p>
201 <table class="download">
202 <tr>
203 <th>Platform</th>
204 <th>Package</th>
205 <th>Size</th>
206 <th>MD5 Checksum</th>
207 </tr>
208 <tr>
209 <td>Windows 32-bit</td>
210 <td>
211 <a onClick="return onDownload(this)" id="win-bundle32"
212 href="http://dl.google.com/android/adt/<?cs var:sdk.win32_bundle_download ?>"><?cs var:sdk.win32_bundle_download ?></a>
213 </td>
214 <td><?cs var:sdk.win32_bundle_bytes ?> bytes</td>
215 <td><?cs var:sdk.win32_bundle_checksum ?></td>
216 </tr>
217 <tr>
218 <td>Windows 64-bit</td>
219 <td>
220 <a onClick="return onDownload(this)" id="win-bundle64"
221 href="http://dl.google.com/android/adt/<?cs var:sdk.win64_bundle_download ?>"><?cs var:sdk.win64_bundle_download ?></a>
222 </td>
223 <td><?cs var:sdk.win64_bundle_bytes ?> bytes</td>
224 <td><?cs var:sdk.win64_bundle_checksum ?></td>
225 </tr>
226 <tr>
227 <td><nobr>Mac OS X 64-bit</nobr></td>
228 <td>
229 <a onClick="return onDownload(this)" id="mac-bundle64"
230 href="http://dl.google.com/android/adt/<?cs var:sdk.mac64_bundle_download ?>"><?cs var:sdk.mac64_bundle_download ?></a>
231 </td>
232 <td><?cs var:sdk.mac64_bundle_bytes ?> bytes</td>
233 <td><?cs var:sdk.mac64_bundle_checksum ?></td>
234 </tr>
235 <tr>
236 <td>Linux 32-bit</td>
237 <td>
238 <a onClick="return onDownload(this)" id="linux-bundle32"
239 href="http://dl.google.com/android/adt/<?cs var:sdk.linux32_bundle_download ?>"><?cs var:sdk.linux32_bundle_download ?></a>
240 </td>
241 <td><?cs var:sdk.linux32_bundle_bytes ?> bytes</td>
242 <td><?cs var:sdk.linux32_bundle_checksum ?></td>
243 </tr>
244 <tr>
245 <td>Linux 64-bit</td>
246 <td>
247 <a onClick="return onDownload(this)" id="linux-bundle64"
248 href="http://dl.google.com/android/adt/<?cs var:sdk.linux64_bundle_download ?>"><?cs var:sdk.linux64_bundle_download ?></a>
249 </td>
250 <td><?cs var:sdk.linux64_bundle_bytes ?> bytes</td>
251 <td><?cs var:sdk.linux64_bundle_checksum ?></td>
252 </tr>
253 </table>
254
255
256<p class="table-caption"><strong>SDK Tools Only</strong></p>
257 <table class="download">
258 <tr>
259 <th>Platform</th>
260 <th>Package</th>
261 <th>Size</th>
262 <th>MD5 Checksum</th>
263 </tr>
264 <tr>
265 <td rowspan="2">Windows</td>
266 <td>
267 <a onclick="return onDownload(this)" href="http://dl.google.com/android/<?cs var:sdk.win_download
268?>"><?cs var:sdk.win_download ?></a>
269 </td>
270 <td><?cs var:sdk.win_bytes ?> bytes</td>
271 <td><?cs var:sdk.win_checksum ?></td>
272 </tr>
273 <tr>
274 <!-- blank TD from Windows rowspan -->
275 <td>
276 <a onclick="return onDownload(this)" id="win-tools" href="http://dl.google.com/android/<?cs
277var:sdk.win_installer
278?>"><?cs var:sdk.win_installer ?></a> (Recommended)
279 </td>
280 <td><?cs var:sdk.win_installer_bytes ?> bytes</td>
281 <td><?cs var:sdk.win_installer_checksum ?></td>
282 </tr>
283 <tr>
284 <td>Mac OS X</td>
285 <td>
286 <a onclick="return onDownload(this)" id="mac-tools" href="http://dl.google.com/android/<?cs
287var:sdk.mac_download
288?>"><?cs var:sdk.mac_download ?></a>
289 </td>
290 <td><?cs var:sdk.mac_bytes ?> bytes</td>
291 <td><?cs var:sdk.mac_checksum ?></td>
292 </tr>
293 <tr>
294 <td>Linux</td>
295 <td>
296 <a onclick="return onDownload(this)" id="linux-tools" href="http://dl.google.com/android/<?cs
297var:sdk.linux_download
298?>"><?cs var:sdk.linux_download ?></a>
299 </td>
300 <td><?cs var:sdk.linux_bytes ?> bytes</td>
301 <td><?cs var:sdk.linux_checksum ?></td>
302 </tr>
303 </table>
304
305</div><!-- end pax -->
306
307
308
309</div><!-- end col-13 for lower-half content -->
310
311
312
313
314<script>
315 if (location.hash == "#Requirements") {
316 $('.reqs').show();
317 } else if (location.hash == "#ExistingIDE") {
318 $('.ide').show();
319 }
320
321 var os;
322 var bundlename;
323 var $toolslink;
324
325 if (navigator.appVersion.indexOf("Win")!=-1) {
326 os = "Windows";
327 bundlename = '#win-bundle';
328 $toolslink = $('#win-tools');
329 } else if (navigator.appVersion.indexOf("Mac")!=-1) {
330 os = "Mac";
331 bundlename = '#mac-bundle';
332 $toolslink = $('#mac-tools');
333 } else if (navigator.appVersion.indexOf("Linux")!=-1) {
334 os = "Linux";
335 bundlename = '#linux-bundle';
336 $toolslink = $('#linux-tools');
337 }
338
339 if (os) {
340 $('#not-supported').hide();
341
342 /* set up primary adt download button */
343 $('#download-bundle-button').show();
344 $('#download-bundle-button').append("Download the SDK <br/><span class='small'>ADT Bundle for " + os + "</span>");
345 $('#download-bundle-button').click(function() {return onDownload(this,true,true);}).attr('href', bundlename);
346
347 /* set up sdk tools only button */
348 $('#download-tools-button').show();
349 $('#download-tools-button').append("Download the SDK Tools for " + os);
350 $('#download-tools-button').click(function() {return onDownload(this,true);}).attr('href', $toolslink.attr('href'));
351 } else {
352 $('.pax').show();
353 }
354
355
356 function onDownload(link, button, bundle) {
357
358 /* set text for download button */
359 if (button) {
360 $("#downloadForRealz").html($(link).text());
361 } else {
362 $("#downloadForRealz").html("Download " + $(link).text());
363 }
364
365 /* if it's a bundle, show the 32/64-bit picker */
366 if (bundle) {
367 $("#downloadForRealz").attr('bundle','true');
368 if ($("#downloadForRealz").text().indexOf("Mac") == -1) {
369 $("p#bitpicker").show();
370 } else {
371 /* mac is always 64 bit, so set it checked */
372 $("p#bitpicker input[value=64]").attr('checked', true);
373 }
374 /* save link name until the bit version is chosen */
375 $("#downloadForRealz").attr('name',$(link).attr('href'));
376 } else {
377 /* if not using bundle, set download button to ignore bitpicker and set url */
378 $("#downloadForRealz").attr('bundle','false');
379 $("#downloadForRealz").attr('href',$(link).attr('href'));
380 /* set picker checked as a fake default */
381 $("p#bitpicker input[value=64]").attr('checked', true);
382 $("a#next-link").html("Setting Up an Existing IDE").attr('href',toRoot + 'sdk/installing/index.html');
383 }
384
385 $("#tos").fadeIn('fast');
386 $("#landing").fadeOut('fast');
387
388 location.hash = "download";
389 return false;
390 }
391
392
393 function onAgreeChecked() {
394 /* verify that the TOS is agreed and a bit version is chosen */
395 if ($("input#agree").is(":checked") && $("#bitpicker input:checked").length) {
396
397 /* if downloading the bundle */
398 if ($("#downloadForRealz").attr('bundle')) {
399 /* construct the name of the link we want based on the bit version */
400 linkId = $("a#downloadForRealz").attr("name") + $("#bitpicker input:checked").val();
401 /* set the real url for download */
402 $("a#downloadForRealz").attr("href", $(linkId).attr("href"));
403 }
404
405 /* reveal the download button */
406 $("a#downloadForRealz").removeClass('disabled');
407 } else {
408 $("a#downloadForRealz").addClass('disabled');
409 }
410 }
411
412 function onDownloadForRealz(link) {
413 if ($("input#agree").is(':checked') && $("#bitpicker input:checked").length) {
414 $("div.sdk-terms").slideUp();
415 $("#sdk-terms-form,.sdk-terms-intro").fadeOut('slow');
416 $("#next-steps").fadeIn('slow');
417 $("h1#tos-header").text('Get Ready to Code!');
418 return true;
419 } else {
420 $("label#agreeLabel,#bitpicker input").parent().stop().animate({color: "#258AAF"}, 200,
421 function() {$("label#agreeLabel,#bitpicker input").parent().stop().animate({color: "#222"}, 200)}
422 );
423 return false;
424 }
425 }
426
427 $(window).hashchange( function(){
428 if (location.hash == "") {
429 location.reload();
430 }
431 });
432
433</script>
434
435
436
437</div><!-- end the wrapper used for relative/absolute positions -->
438<?cs # THIS DIV WAS OPENED IN INDEX.JD ?>
439
440
441
442
443 <?cs else ?> <?cs # end if online ?>
444
445 <?cs if:sdk.preview ?><?cs # it's preview offline docs ?>
446 <p>Welcome developers! We are pleased to provide you with a preview SDK for the upcoming
447 Android 3.0 release, to give you a head-start on developing applications for it.
448 </p>
449
450 <p>See the <a
451 href="<?cs var:toroot ?>sdk/preview/start.html">Getting Started</a> document for more information
452 about how to set up the preview SDK and get started.</p>
453 <style type="text/css">
454 .non-preview { display:none; }
455 </style>
456
457 <?cs else ?><?cs # it's normal offline docs ?>
458
459 <?cs ######## HERE IS THE JD DOC CONTENT FOR OFFLINE ######### ?>
460 <?cs call:tag_list(root.descr) ?>
461 <style type="text/css">
462 body .offline { display:block; }
463 body .online { display:none; }
464 </style>
465 <script>
466 $('.reqs').show();
467 </script>
468 <?cs /if ?>
469
470 <?cs /if ?> <?cs # end if/else online ?>
471
472<?cs /if ?> <?cs # end if/else NDK ?>
473
474<?cs /if ?> <?cs # end if/else redirect ?>
475
476
477</div><!-- end jd-content -->
478
479<?cs if:!sdk.redirect ?>
480<?cs include:"footer.cs" ?>
481<?cs /if ?>
482
483</div><!-- end g-unit -->
484
485<?cs include:"trailer.cs" ?>
486
487</body>
488</html>
489
490
491