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