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