1 <?cs include:"doctype.cs" ?>
2 <?cs include:"macros.cs" ?>
3 <html<?cs if:devsite ?> devsite<?cs /if ?>>
4 <?cs if:sdk.redirect ?>
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 ?>">
12 <?cs include:"head_tag.cs" ?>
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">
20 <?cs include:"header.cs" ?>
25 ?>class="col-13" id="doc-col"<?cs /if ?> >
27 <?cs if:sdk.redirect ?>
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 ?>
40 <?cs # else, if NOT redirect ...
43 # The following is for SDK/NDK pages
48 <?cs if:header.hide ?><?cs else ?>
49 <h1 itemprop="name"><?cs var:page.title ?></h1>
51 <div id="jd-content" itemprop="description">
53 <?cs if:sdk.not_latest_version ?>
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>
69 # the following is for the NDK
71 # (nested in if/else redirect)
78 <table class="download" id="download-table">
86 <td>Windows 32-bit</td>
88 <a onClick="return onDownload(this)"
89 href="http://dl.google.com/android/ndk/<?cs var:ndk.win32_download ?>"><?cs var:ndk.win32_download ?></a>
91 <td><?cs var:ndk.win32_bytes ?> bytes</td>
92 <td><?cs var:ndk.win32_checksum ?></td>
95 <td>Windows 64-bit</td>
97 <a onClick="return onDownload(this)"
98 href="http://dl.google.com/android/ndk/<?cs var:ndk.win64_download ?>"><?cs var:ndk.win64_download ?></a>
100 <td><?cs var:ndk.win64_bytes ?> bytes</td>
101 <td><?cs var:ndk.win64_checksum ?></td>
104 <td>Mac OS X 32-bit</td>
106 <a onClick="return onDownload(this)"
107 href="http://dl.google.com/android/ndk/<?cs var:ndk.mac32_download ?>"><?cs var:ndk.mac32_download ?></a>
109 <td><?cs var:ndk.mac32_bytes ?> bytes</td>
110 <td><?cs var:ndk.mac32_checksum ?></td>
113 <td>Mac OS X 64-bit</td>
115 <a onClick="return onDownload(this)"
116 href="http://dl.google.com/android/ndk/<?cs var:ndk.mac64_download ?>"><?cs var:ndk.mac64_download ?></a>
118 <td><?cs var:ndk.mac64_bytes ?> bytes</td>
119 <td><?cs var:ndk.mac64_checksum ?></td>
122 <td>Linux 32-bit (x86)</td>
124 <a onClick="return onDownload(this)"
125 href="http://dl.google.com/android/ndk/<?cs var:ndk.linux32_download ?>"><?cs var:ndk.linux32_download ?></a>
127 <td><?cs var:ndk.linux32_bytes ?> bytes</td>
128 <td><?cs var:ndk.linux32_checksum ?></td>
131 <td>Linux 64-bit (x86)</td>
133 <a onClick="return onDownload(this)"
134 href="http://dl.google.com/android/ndk/<?cs var:ndk.linux64_download ?>"><?cs var:ndk.linux64_download ?></a>
136 <td><?cs var:ndk.linux64_bytes ?> bytes</td>
137 <td><?cs var:ndk.linux64_checksum ?></td>
141 <?cs ######## HERE IS THE JD DOC CONTENT ######### ?>
142 <?cs call:tag_list(root.descr) ?>
147 function onDownload(link) {
149 $("#downloadForRealz").html("Download " + $(link).text());
150 $("#downloadForRealz").attr('href',$(link).attr('href'));
152 $("#tos").fadeIn('slow');
154 location.hash = "download";
159 function onAgreeChecked() {
160 if ($("input#agree").is(":checked")) {
161 $("a#downloadForRealz").removeClass('disabled');
163 $("a#downloadForRealz").addClass('disabled');
167 function onDownloadNdkForRealz(link) {
168 if ($("input#agree").is(':checked')) {
169 $("#tos").fadeOut('slow');
171 $('html, body').animate({
172 scrollTop: $("#Installing").offset().top
174 $("#Installing").click();
179 $("label#agreeLabel").parent().stop().animate({color: "#258AAF"}, 200,
180 function() {$("label#agreeLabel").parent().stop().animate({color: "#222"}, 200)}
186 $(window).hashchange( function(){
187 if (location.hash == "") {
195 <?cs # end if NDK ...
202 # the following is for the SDK
204 # (nested in if/else redirect and if/else NDK)
210 <?cs if:android.whichdoc == "online" ?>
213 <?cs ######## HERE IS THE JD DOC CONTENT FOR ONLINE ######### ?>
214 <?cs call:tag_list(root.descr) ?>
219 <h4><a href='' class="expandable"
220 onclick="toggleExpandable(this,'.pax');hideExpandable('.myide,.reqs');return false;"
221 >DOWNLOAD FOR OTHER PLATFORMS</a></h4>
224 <div class="pax col-13 online" style="display:none;margin:0;">
227 <p class="table-caption"><strong>ADT Bundle</strong></p>
228 <table class="download">
233 <th>MD5 Checksum</th>
236 <td>Windows 32-bit</td>
238 <a onClick="return onDownload(this)" id="win-bundle32"
239 href="http://dl.google.com/android/adt/<?cs var:sdk.win32_bundle_download ?>"><?cs var:sdk.win32_bundle_download ?></a>
241 <td><?cs var:sdk.win32_bundle_bytes ?> bytes</td>
242 <td><?cs var:sdk.win32_bundle_checksum ?></td>
245 <td>Windows 64-bit</td>
247 <a onClick="return onDownload(this)" id="win-bundle64"
248 href="http://dl.google.com/android/adt/<?cs var:sdk.win64_bundle_download ?>"><?cs var:sdk.win64_bundle_download ?></a>
250 <td><?cs var:sdk.win64_bundle_bytes ?> bytes</td>
251 <td><?cs var:sdk.win64_bundle_checksum ?></td>
254 <td><nobr>Mac OS X 64-bit</nobr></td>
256 <a onClick="return onDownload(this)" id="mac-bundle64"
257 href="http://dl.google.com/android/adt/<?cs var:sdk.mac64_bundle_download ?>"><?cs var:sdk.mac64_bundle_download ?></a>
259 <td><?cs var:sdk.mac64_bundle_bytes ?> bytes</td>
260 <td><?cs var:sdk.mac64_bundle_checksum ?></td>
263 <td>Linux 32-bit</td>
265 <a onClick="return onDownload(this)" id="linux-bundle32"
266 href="http://dl.google.com/android/adt/<?cs var:sdk.linux32_bundle_download ?>"><?cs var:sdk.linux32_bundle_download ?></a>
268 <td><?cs var:sdk.linux32_bundle_bytes ?> bytes</td>
269 <td><?cs var:sdk.linux32_bundle_checksum ?></td>
272 <td>Linux 64-bit</td>
274 <a onClick="return onDownload(this)" id="linux-bundle64"
275 href="http://dl.google.com/android/adt/<?cs var:sdk.linux64_bundle_download ?>"><?cs var:sdk.linux64_bundle_download ?></a>
277 <td><?cs var:sdk.linux64_bundle_bytes ?> bytes</td>
278 <td><?cs var:sdk.linux64_bundle_checksum ?></td>
283 <p class="table-caption"><strong>SDK Tools Only</strong></p>
284 <table class="download">
289 <th>MD5 Checksum</th>
292 <td rowspan="2">Windows<br>32 & 64-bit</td>
294 <a onclick="return onDownload(this)" href="http://dl.google.com/android/<?cs var:sdk.win_download
295 ?>"><?cs var:sdk.win_download ?></a>
297 <td><?cs var:sdk.win_bytes ?> bytes</td>
298 <td><?cs var:sdk.win_checksum ?></td>
301 <!-- blank TD from Windows rowspan -->
303 <a onclick="return onDownload(this)" id="win-tools" href="http://dl.google.com/android/<?cs
304 var:sdk.win_installer
305 ?>"><?cs var:sdk.win_installer ?></a> (Recommended)
307 <td><?cs var:sdk.win_installer_bytes ?> bytes</td>
308 <td><?cs var:sdk.win_installer_checksum ?></td>
311 <td><nobr>Mac OS X</nobr><br>32 & 64-bit</td>
313 <a onclick="return onDownload(this)" id="mac-tools" href="http://dl.google.com/android/<?cs
315 ?>"><?cs var:sdk.mac_download ?></a>
317 <td><?cs var:sdk.mac_bytes ?> bytes</td>
318 <td><?cs var:sdk.mac_checksum ?></td>
321 <td>Linux<br>32 & 64-bit</td>
323 <a onclick="return onDownload(this)" id="linux-tools" href="http://dl.google.com/android/<?cs
324 var:sdk.linux_download
325 ?>"><?cs var:sdk.linux_download ?></a>
327 <td><?cs var:sdk.linux_bytes ?> bytes</td>
328 <td><?cs var:sdk.linux_checksum ?></td>
332 </div><!-- end pax -->
336 </div><!-- end col-13 for lower-half content -->
342 if (location.hash == "#Requirements") {
344 } else if (location.hash == "#ExistingIDE") {
352 if (navigator.appVersion.indexOf("Win")!=-1) {
354 bundlename = '#win-bundle';
355 $toolslink = $('#win-tools');
356 } else if (navigator.appVersion.indexOf("Mac")!=-1) {
358 bundlename = '#mac-bundle';
359 $toolslink = $('#mac-tools');
360 } else if (navigator.appVersion.indexOf("Linux")!=-1) {
362 bundlename = '#linux-bundle';
363 $toolslink = $('#linux-tools');
367 $('#not-supported').hide();
369 /* set up primary adt download button */
370 $('#download-bundle-button').show();
371 $('#download-bundle-button').append("Download the SDK <br/><span class='small'>ADT Bundle for " + os + "</span>");
372 $('#download-bundle-button').click(function() {return onDownload(this,true,true);}).attr('href', bundlename);
374 /* set up sdk tools only button */
375 $('#download-tools-button').show();
376 $('#download-tools-button').append("Download the SDK Tools for " + os);
377 $('#download-tools-button').click(function() {return onDownload(this,true);}).attr('href', $toolslink.attr('href'));
383 function onDownload(link, button, bundle) {
385 /* set text for download button */
387 $("#downloadForRealz").html($(link).text());
389 $("#downloadForRealz").html("Download " + $(link).text());
392 /* if it's a bundle, show the 32/64-bit picker */
394 $("#downloadForRealz").attr('bundle','true');
395 if ($("#downloadForRealz").text().indexOf("Mac") == -1) {
396 $("p#bitpicker").show();
398 /* mac is always 64 bit, so set it checked */
399 $("p#bitpicker input[value=64]").attr('checked', true);
401 /* save link name until the bit version is chosen */
402 $("#downloadForRealz").attr('name',$(link).attr('href'));
404 /* if not using bundle, set download button to ignore bitpicker and set url */
405 $("#downloadForRealz").attr('bundle','false');
406 $("#downloadForRealz").attr('href',$(link).attr('href'));
407 /* set picker checked as a fake default */
408 $("p#bitpicker input[value=64]").attr('checked', true);
409 $("a#next-link").html("Setting Up an Existing IDE").attr('href',toRoot + 'sdk/installing/index.html');
412 $("#tos").fadeIn('fast');
413 $("#landing").fadeOut('fast');
415 location.hash = "download";
420 function onAgreeChecked() {
421 /* verify that the TOS is agreed and a bit version is chosen */
422 if ($("input#agree").is(":checked") && $("#bitpicker input:checked").length) {
424 /* if downloading the bundle */
425 if ($("#downloadForRealz").attr('bundle')) {
426 /* construct the name of the link we want based on the bit version */
427 linkId = $("a#downloadForRealz").attr("name") + $("#bitpicker input:checked").val();
428 /* set the real url for download */
429 $("a#downloadForRealz").attr("href", $(linkId).attr("href"));
432 /* reveal the download button */
433 $("a#downloadForRealz").removeClass('disabled');
435 $("a#downloadForRealz").addClass('disabled');
439 function onDownloadForRealz(link) {
440 if ($("input#agree").is(':checked') && $("#bitpicker input:checked").length) {
441 $("div.sdk-terms").slideUp();
442 $("#sdk-terms-form,.sdk-terms-intro").fadeOut('slow');
443 $("#next-steps").fadeIn('slow');
444 $("h1#tos-header").text('Get Ready to Code!');
447 $("label#agreeLabel,#bitpicker input").parent().stop().animate({color: "#258AAF"}, 200,
448 function() {$("label#agreeLabel,#bitpicker input").parent().stop().animate({color: "#222"}, 200)}
454 $(window).hashchange( function(){
455 if (location.hash == "") {
464 </div><!-- end the wrapper used for relative/absolute positions -->
465 <?cs # THIS DIV WAS OPENED IN INDEX.JD ?>
470 <?cs else ?> <?cs # end if online ?>
472 <?cs if:sdk.preview ?><?cs # it's preview offline docs ?>
473 <p>Welcome developers! We are pleased to provide you with a preview SDK for the upcoming
474 Android 3.0 release, to give you a head-start on developing applications for it.
478 href="<?cs var:toroot ?>sdk/preview/start.html">Getting Started</a> document for more information
479 about how to set up the preview SDK and get started.</p>
480 <style type="text/css">
481 .non-preview { display:none; }
484 <?cs else ?><?cs # it's normal offline docs ?>
486 <?cs ######## HERE IS THE JD DOC CONTENT FOR OFFLINE ######### ?>
487 <?cs call:tag_list(root.descr) ?>
488 <style type="text/css">
489 body .offline { display:block; }
490 body .online { display:none; }
497 <?cs /if ?> <?cs # end if/else online ?>
499 <?cs /if ?> <?cs # end if/else NDK ?>
501 <?cs /if ?> <?cs # end if/else redirect ?>
504 </div><!-- end jd-content -->
506 <?cs if:!sdk.redirect ?>
507 <?cs include:"footer.cs" ?>
510 </div><!-- end g-unit -->
512 <?cs include:"trailer.cs" ?>