sdkpage.cs revision 6f0ed9bddd6457b358f662a2d1657686f633f903
1<?cs include:"doctype.cs" ?> 2<?cs include:"macros.cs" ?> 3<?cs include:"../../../../frameworks/base/docs/html/sdk/sdk_vars.cs" ?> 4<html<?cs if:devsite ?> devsite<?cs /if ?>> 5<?cs if:sdk.redirect ?> 6 <head> 7 <title>Redirecting...</title> 8 <meta http-equiv="refresh" content="0;url=<?cs var:toroot ?>sdk/<?cs 9 if:sdk.redirect.path ?><?cs var:sdk.redirect.path ?><?cs 10 else ?>index.html<?cs /if ?>"> 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||devsite)?><?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 style="white-space:nowrap">Size (Bytes)</th> 84 <th>SHA1 Checksum</th> 85 </tr> 86 <tr> 87 <td>Windows 32-bit</td> 88 <td> 89 <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos" 90 href="http://dl.google.com/android/repository/<?cs var:ndk.win32_download ?>"><?cs var:ndk.win32_download ?></a> 91 </td> 92 <td><?cs var:ndk.win32_bytes ?></td> 93 <td><?cs var:ndk.win32_checksum ?></td> 94 </tr> 95 <!-- <tr> 96 <td> 97 <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos" 98 href="http://dl.google.com/android/ndk/<?cs var:ndk.win32.legacy_download ?>"><?cs var:ndk.win32.legacy_download ?></a> 99 </td> 100 <td><?cs var:ndk.win32.legacy_bytes ?></td> 101 <td><?cs var:ndk.win32.legacy_checksum ?></td> 102 </tr> --> 103 <tr> 104 <td>Windows 64-bit</td> 105 <td> 106 <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos" 107 href="http://dl.google.com/android/repository/<?cs var:ndk.win64_download ?>"><?cs var:ndk.win64_download ?></a> 108 </td> 109 <td><?cs var:ndk.win64_bytes ?></td> 110 <td><?cs var:ndk.win64_checksum ?></td> 111 </tr> 112 <!-- <tr> 113 <td> 114 <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos" 115 href="http://dl.google.com/android/repository/<?cs var:ndk.win64.legacy_download ?>"><?cs var:ndk.win64.legacy_download ?></a> 116 </td> 117 <td><?cs var:ndk.win64.legacy_bytes ?></td> 118 <td><?cs var:ndk.win64.legacy_checksum ?></td> 119 </tr> --> 120<!-- (this item is deprecated) 121 <tr> 122 <td>Mac OS X 32-bit</td> 123 <td> 124 <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos" 125 href="http://dl.google.com/android/repository/<?cs var:ndk.mac32_download ?>"><?cs var:ndk.mac32_download ?></a> 126 </td> 127 <td><?cs var:ndk.mac32_bytes ?></td> 128 <td><?cs var:ndk.mac32_checksum ?></td> 129 </tr> --> 130 <!-- (this item is deprecated) 131 <tr> 132 <td> 133 <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos" 134 href="http://dl.google.com/android/repository/<?cs var:ndk.mac32.legacy_download ?>"><?cs var:ndk.mac32.legacy_download ?></a> 135 </td> 136 <td><?cs var:ndk.mac32.legacy_bytes ?></td> 137 <td><?cs var:ndk.mac32.legacy_checksum ?></td> 138 </tr> --> 139 <td>Mac OS X 64-bit</td> 140 <td> 141 <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos" 142 href="http://dl.google.com/android/repository/<?cs var:ndk.mac64_download ?>"><?cs var:ndk.mac64_download ?></a> 143 </td> 144 <td><?cs var:ndk.mac64_bytes ?></td> 145 <td><?cs var:ndk.mac64_checksum ?></td> 146 </tr> 147 <!-- <tr> 148 <td> 149 <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos" 150 href="http://dl.google.com/android/repository/<?cs var:ndk.mac64.legacy_download ?>"><?cs var:ndk.mac64.legacy_download ?></a> 151 </td> 152 <td><?cs var:ndk.mac64.legacy_bytes ?></td> 153 <td><?cs var:ndk.mac64.legacy_checksum ?></td> 154 </tr> --> 155 <!-- <tr> 156 <td> 157 <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos" 158 href="http://dl.google.com/android/repository/<?cs var:ndk.linux32.legacy_download ?>"><?cs var:ndk.linux32.legacy_download ?></a> 159 </td> 160 <td><?cs var:ndk.linux32.legacy_bytes ?></td> 161 <td><?cs var:ndk.linux32.legacy_checksum ?></td> 162 </tr> --> 163 <tr> 164 <td>Linux 64-bit (x86)</td> 165 <td> 166 <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos" 167 href="http://dl.google.com/android/repository/<?cs var:ndk.linux64_download ?>"><?cs var:ndk.linux64_download ?></a> 168 </td> 169 <td><?cs var:ndk.linux64_bytes ?></td> 170 <td><?cs var:ndk.linux64_checksum ?></td> 171 </tr> 172 <!-- <tr> 173 <td> 174 <a onClick="return onDownload(this)" data-modal-toggle="ndk_tos" 175 href="http://dl.google.com/android/repository/<?cs var:ndk.linux64.legacy_download ?>"><?cs var:ndk.linux64.legacy_download ?></a> 176 </td> 177 <td><?cs var:ndk.linux64.legacy_bytes ?></td> 178 <td><?cs var:ndk.linux64.legacy_checksum ?></td> 179 </tr> --> 180 181 </table> 182 183 <?cs ######## HERE IS THE JD DOC CONTENT ######### ?> 184 <?cs call:tag_list(root.descr) ?> 185 186 187<?cs ######## The NDK version of the download script ######### ?> 188<script> 189 function onDownload(link) { 190 191 $("#downloadForRealz").html("Download " + $(link).text()); 192 $("#downloadForRealz").attr('href',$(link).attr('href')); 193 194 return false; 195 } 196 197 198 function onAgreeChecked() { 199 if ($("input#agree").is(":checked")) { 200 $("a#downloadForRealz").removeClass('disabled'); 201 } else { 202 $("a#downloadForRealz").addClass('disabled'); 203 } 204 } 205 206 207 function onDownloadForRealz(link) { 208 if ($("input#agree").is(':checked')) { 209 $("div.sdk-terms").slideUp(); 210 $("h2#tos-header").text('Now downloading...'); 211 $(".sdk-terms-intro").text('Your download is in progress.'); 212 $("#sdk-terms-form").fadeOut('slow', function() { 213 setTimeout(function() { 214 // close the dialog 215 $('#ndk_tos').trigger('modal-close'); 216 // reload to refresh the tos or optionally forward the user 217 location.reload(); 218 }, 3000); 219 }); 220 ga('send', 'event', 'SDK', 'NDK tools', $("#downloadForRealz").html()); 221 return true; 222 } else { 223 return false; 224 } 225 } 226 227 228 $(window).hashchange( function(){ 229 if (location.hash == "") { 230 location.reload(); 231 } 232 }); 233 234</script> 235 236 <?cs else ?> 237<?cs # end if NDK ... 238# 239# 240# 241# 242# 243# 244# the following is for the SDK 245# 246# (nested in if/else redirect and if/else NDK) 247# 248# 249# 250# 251?> 252 <?cs if:android.whichdoc == "online" ?> 253 254 255<?cs ######## HERE IS THE JD DOC CONTENT FOR ONLINE ######### ?> 256<?cs call:tag_list(root.descr) ?> 257 258 259<?cs ####### TODO: Remove this whole file from processing. ######## ?> 260 261 262<?cs ######## The Android Studio version of the download script ######### ?> 263<script> 264 var os; 265 var bundlename; 266 var $toolslink; 267 268 if (navigator.appVersion.indexOf("Mobile")!=-1) { 269 // Do nothing for any "mobile" user agent 270 } else if (navigator.appVersion.indexOf("Win")!=-1) { 271 os = "Windows"; 272 bundlename = '#win-bundle'; 273 $toolslink = $('#win-tools'); 274 } else if (navigator.appVersion.indexOf("Mac")!=-1) { 275 os = "Mac"; 276 bundlename = '#mac-bundle'; 277 $toolslink = $('#mac-tools'); 278 } else if (navigator.appVersion.indexOf("Linux")!=-1 && navigator.appVersion.indexOf("Android")==-1) { 279 os = "Linux"; 280 bundlename = '#linux-bundle'; 281 $toolslink = $('#linux-tools'); 282 } 283 284 if (os != undefined) { 285 $('#not-supported').hide(); 286 287 /* set up primary Android Studio download button */ 288 idname = bundlename + "-size"; 289 sizeMB = $(idname).text().split(' MB')[0]; 290 $('.download-bundle-button > .small').html(" for " + os + " <em>(" + sizeMB + " MB)</em>"); 291 $('.download-bundle-button').click(function() { onDownload(this,true,true);}).attr('href', bundlename); 292 } 293 294 295 function onDownload(link, button, bundle) { 296 297 /* set text for download button */ 298 if (button) { 299 $("#downloadForRealz").html($(link).text()); 300 } else { 301 $("#downloadForRealz").html("Download " + $(link).text()); 302 } 303 304 $("#downloadForRealz").attr('bundle', bundle); 305 if (bundle && !button) { 306 $("a#downloadForRealz").attr("name", "#" + $(link).attr('id')); 307 } else { 308 $("h2#tos-header").text('Download the Android SDK Tools'); 309 $("a#downloadForRealz").attr("name", $(link).attr('href')); 310 } 311 312 return false; 313 } 314 315 316 function onAgreeChecked() { 317 /* verify that the TOS is agreed */ 318 if ($("input#agree").is(":checked")) { 319 320 /* if downloading the bundle */ 321 if ($("#downloadForRealz").attr('bundle')) { 322 /* construct the name of the link we want */ 323 linkId = $("a#downloadForRealz").attr("name"); 324 /* set the real url for download */ 325 $("a#downloadForRealz").attr("href", $(linkId).attr("href")); 326 } else { 327 $("a#downloadForRealz").attr("href", $("a#downloadForRealz").attr("name")); 328 } 329 330 /* reveal the download button */ 331 $("a#downloadForRealz").removeClass('disabled'); 332 } else { 333 $("a#downloadForRealz").addClass('disabled'); 334 } 335 } 336 337 function onDownloadForRealz(link) { 338 if ($("input#agree").is(':checked')) { 339 $("div.sdk-terms").slideUp(); 340 if ($("#downloadForRealz").attr('bundle') == 'true') { 341 $("h2#tos-header").text('Now downloading Android Studio!'); 342 $(".sdk-terms-intro").text('Redirecting to the install instructions...'); 343 $("#sdk-terms-form").slideUp(function() { 344 setTimeout(function() { 345 window.location = "/sdk/installing/index.html"; 346 }, 2000); 347 }); 348 } else { 349 $("h2#tos-header").text('Now downloading the Android SDK Tools!'); 350 $(".sdk-terms-intro").html("<p>Because you've chosen to download " + 351 "only the Android SDK tools (and not Android Studio), there are no " + 352 "setup procedures to follow.</p><p>For information about how to " + 353 "keep your SDK tools up to date, refer to the " + 354 "<a href='/tools/help/sdk-manager.html'>SDK Manager</a> guide.</p>"); 355 $("#sdk-terms-form").slideUp(); 356 } 357 ga('send', 'event', 'SDK', 'IDE and Tools', $("#downloadForRealz").html()); 358 return true; 359 } else { 360 return false; 361 } 362 } 363 364 $(window).hashchange( function(){ 365 if (location.hash == "") { 366 location.reload(); 367 } 368 }); 369 370</script> 371 372 373 374 375<?cs # THIS DIV WAS OPENED IN INDEX.JD ?> 376 377 378 379 380 <?cs else ?> <?cs # end if online ?> 381 382 <?cs if:sdk.preview ?><?cs # it's preview offline docs ?> 383 <p>Welcome developers! We are pleased to provide you with a preview SDK for the upcoming 384 Android 3.0 release, to give you a head-start on developing applications for it. 385 </p> 386 387 <p>See the <a 388 href="<?cs var:toroot ?>sdk/preview/start.html">Getting Started</a> document for more information 389 about how to set up the preview SDK and get started.</p> 390 <style type="text/css"> 391 .non-preview { display:none; } 392 </style> 393 394 <?cs else ?><?cs # it's normal offline docs ?> 395 396 <?cs ######## HERE IS THE JD DOC CONTENT FOR OFFLINE ######### ?> 397 <?cs call:tag_list(root.descr) ?> 398 <style type="text/css"> 399 body .offline { display:block; } 400 body .online { display:none; } 401 </style> 402 <script> 403 $('.reqs').show(); 404 </script> 405 <?cs /if ?> 406 407 <?cs /if ?> <?cs # end if/else online ?> 408 409<?cs /if ?> <?cs # end if/else NDK ?> 410 411<?cs /if ?> <?cs # end if/else redirect ?> 412 413 414</div><!-- end jd-content --> 415 416<?cs if:!sdk.redirect && !devsite ?> 417<?cs include:"footer.cs" ?> 418<?cs /if ?> 419 420</div><!-- end g-unit --> 421 422<?cs include:"trailer.cs" ?> 423<?cs if:!devsite ?> 424<script src="https://developer.android.com/ytblogger_lists_unified.js?v=17" type="text/javascript"></script> 425<script src="/jd_lists_unified.js?v=17" type="text/javascript"></script> 426<script src="/jd_extras.js?v=17" type="text/javascript"></script> 427<script src="/jd_collections.js?v=17" type="text/javascript"></script> 428<script src="/jd_tag_helpers.js?v=17" type="text/javascript"></script> 429<?cs /if ?><!--end !devsite --> 430 431 432<!-- Start of Tag --> 433<script type="text/javascript"> 434var axel = Math.random() + ""; 435var a = axel * 10000000000000; 436document.write('<iframe src="https://2507573.fls.doubleclick.net/activityi;src=2507573;type=other026;cat=googl348;ord=' + a + '?" width="1" height="1" frameborder="0" style="display:none"></iframe>'); 437</script> 438<noscript> 439<iframe src="https://2507573.fls.doubleclick.net/activityi;src=2507573;type=other026;cat=googl348;ord=1?" width="1" height="1" frameborder="0" style="display:none"></iframe> 440</noscript> 441<!-- End of Tag --> 442</body> 443</html> 444