sdkpage.cs revision db3678bcaadf74b1a940a3dafb9fda4e238250be
1<?cs include:"doctype.cs" ?> 2<?cs include:"macros.cs" ?> 3<html> 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="_gaq.push(['_trackEvent', 'Tools', 'Download NDK', 'Link <' + <?cs var:ndk.win_download ?> + '>']);" 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 class="alt-color"> 96 <td>Mac OS X (intel)</td> 97 <td> 98 <a onClick="_gaq.push(['_trackEvent', 'Tools', 'Download NDK', 'Link <' + <?cs var:ndk.mac_download ?> + '>']);" 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="_gaq.push(['_trackEvent', 'Tools', 'Download NDK', 'Link <' + <?cs var:ndk.linux_download ?> + '>']);" 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 <?cs else ?> 119<?cs # end if NDK ... 120# 121# 122# 123# 124# 125# 126# the following is for the SDK 127# 128# (nested in if/else redirect and if/else NDK) 129# 130# 131# 132# 133?> 134 <?cs if:android.whichdoc == "online" ?> 135 136 137<?cs ######## HERE IS THE JD DOC CONTENT FOR ONLINE ######### ?> 138<?cs call:tag_list(root.descr) ?> 139 140<div class="wrap"> 141<div class="pax col-13 online" style="display:none"> 142 143 144 145 146<p class="table-caption"><strong>ADT Bundle</strong></p> 147 <table class="download"> 148 <tr> 149 <th>Platform</th> 150 <th>Package</th> 151 <th>Size</th> 152 <th>MD5 Checksum</th> 153 </tr> 154 <tr> 155 <td>Windows</td> 156 <td> 157 <a onClick="return onDownload(this)" id="win-bundle" 158 href="http://dl.google.com/android/sdk/<?cs var:sdk.win_bundle_download ?>"><?cs var:sdk.win_bundle_download ?></a> 159 </td> 160 <td><?cs var:sdk.win_bundle_bytes ?> bytes</td> 161 <td><?cs var:sdk.win_bundle_checksum ?></td> 162 </tr> 163 <tr class="alt-color"> 164 <td>Mac OS X (intel)</td> 165 <td> 166 <a onClick="return onDownload(this)" id="mac-bundle" 167 href="http://dl.google.com/android/sdk/<?cs var:ndk.mac_bundle_download ?>"><?cs var:sdk.mac_bundle_download ?></a> 168 </td> 169 <td><?cs var:sdk.mac_bundle_bytes ?> bytes</td> 170 <td><?cs var:sdk.mac_bundle_checksum ?></td> 171 </tr> 172 <tr> 173 <td>Linux 32/64-bit (x86)</td> 174 <td> 175 <a onClick="return onDownload(this)" id="linux-bundle" 176 href="http://dl.google.com/android/sdk/<?cs var:sdk.linux_bundle_download ?>"><?cs var:sdk.linux_bundle_download ?></a> 177 </td> 178 <td><?cs var:sdk.linux_bundle_bytes ?> bytes</td> 179 <td><?cs var:sdk.linux_bundle_checksum ?></td> 180 </tr> 181 </table> 182 183 184<p class="table-caption"><strong>SDK Tools Only</strong></p> 185 <table class="download"> 186 <tr> 187 <th>Platform</th> 188 <th>Package</th> 189 <th>Size</th> 190 <th>MD5 Checksum</th> 191 </tr> 192 <tr> 193 <td rowspan="2">Windows</td> 194 <td> 195 <a onclick="return onDownload(this)" href="http://dl.google.com/android/<?cs var:sdk.win_download 196?>"><?cs var:sdk.win_download ?></a> 197 </td> 198 <td><?cs var:sdk.win_bytes ?> bytes</td> 199 <td><?cs var:sdk.win_checksum ?></td> 200 </tr> 201 <tr> 202 <!-- blank TD from Windows rowspan --> 203 <td> 204 <a onclick="return onDownload(this)" id="win-tools" href="http://dl.google.com/android/<?cs 205var:sdk.win_installer 206?>"><?cs var:sdk.win_installer ?></a> (Recommended) 207 </td> 208 <td><?cs var:sdk.win_installer_bytes ?> bytes</td> 209 <td><?cs var:sdk.win_installer_checksum ?></td> 210 </tr> 211 <tr class="alt-color"> 212 <td>Mac OS X (intel)</td> 213 <td> 214 <a onclick="return onDownload(this)" id="mac-tools" href="http://dl.google.com/android/<?cs 215var:sdk.mac_download 216?>"><?cs var:sdk.mac_download ?></a> 217 </td> 218 <td><?cs var:sdk.mac_bytes ?> bytes</td> 219 <td><?cs var:sdk.mac_checksum ?></td> 220 </tr> 221 <tr> 222 <td>Linux (i386)</td> 223 <td> 224 <a onclick="return onDownload(this)" id="linux-tools" href="http://dl.google.com/android/<?cs 225var:sdk.linux_download 226?>"><?cs var:sdk.linux_download ?></a> 227 </td> 228 <td><?cs var:sdk.linux_bytes ?> bytes</td> 229 <td><?cs var:sdk.linux_checksum ?></td> 230 </tr> 231 </table> 232 233 234 235 236 237 238 239<script> 240 241 var os; 242 var $bundlelink; 243 var $toolslink; 244 245 if (navigator.appVersion.indexOf("Win")!=-1) { 246 os = "Windows"; 247 $bundlelink = $('#win-bundle'); 248 $toolslink = $('#win-tools'); 249 } else if (navigator.appVersion.indexOf("Mac")!=-1) { 250 os = "Mac"; 251 $bundlelink = $('#mac-bundle'); 252 $toolslink = $('#mac-tools'); 253 } else if (navigator.appVersion.indexOf("Linux")!=-1) { 254 os = "Linux"; 255 $bundlelink = $('#linux-bundle'); 256 $toolslink = $('#linux-tools'); 257 } 258 259 if (os) { 260 $('#not-supported').hide(); 261 262 /* set up primary adt download button */ 263 $('#download-bundle-button').show(); 264 $('#download-bundle-button').append("Download the SDK <br/><span class='small'>ADT Bundle for " + os + "</span>"); 265 $('#download-bundle-button').click(function() {return onDownload(this,true);}).attr('href', $bundlelink.attr('href')); 266 267 /* set up sdk tools only button */ 268 $('#download-tools-button').show(); 269 $('#download-tools-button').append("Download the SDK Tools for " + os); 270 $('#download-tools-button').click(function() {return onDownload(this,true);}).attr('href', $toolslink.attr('href')); 271 } else { 272 $('.pax').show(); 273 } 274 275 function onDownload(link, button) { 276 277 if (button) { 278 $("#downloadForRealz").html($(link).text()); 279 } else { 280 $("#downloadForRealz").html("Download " + $(link).text()); 281 $("a#next-link").html("Setting Up an Existing IDE").attr('href',toRoot + 'sdk/installing/index.html'); 282 } 283 $("#downloadForRealz").attr('href',$(link).attr('href')); 284 285 $("#tos").fadeIn('fast'); 286 $("#landing").fadeOut('fast'); 287 288 location.hash = "download"; 289 return false; 290 } 291 292 293 function onAgreeChecked() { 294 if ($("input#agree").is(":checked")) { 295 $("a#downloadForRealz").removeClass('disabled'); 296 } else { 297 $("a#downloadForRealz").addClass('disabled'); 298 } 299 } 300 301 function onDownloadForRealz(link) { 302 if ($("input#agree").is(':checked')) { 303 $("div.sdk-terms").slideUp(); 304 $("#sdk-terms-form,.sdk-terms-intro").fadeOut('slow'); 305 $("#next-steps").fadeIn('slow'); 306 $("h1#tos-header").text('Get Ready to Code!'); 307 return true; 308 } else { 309 $("label#agreeLabel").parent().stop().animate({color: "#258AAF"}, 200, 310 function() {$("label#agreeLabel").parent().stop().animate({color: "#222"}, 200)} 311 ); 312 return false; 313 } 314 } 315 316 $(window).hashchange( function(){ 317 console.log('hash: '+location.hash); 318 if (location.hash == "") { 319 location.reload(); 320 } 321 }); 322 323</script> 324 325</div><!-- end pax --> 326</div><!-- end wrap --> 327 328 329</div><!-- end the wrapper used for relative/absolute positions --> 330<?cs # THIS DIV WAS OPENED IN INDEX.JD ?> 331 332 333 334 335 <?cs else ?> <?cs # end if online ?> 336 337 <?cs if:sdk.preview ?><?cs # it's preview offline docs ?> 338 <p>Welcome developers! We are pleased to provide you with a preview SDK for the upcoming 339 Android 3.0 release, to give you a head-start on developing applications for it. 340 </p> 341 342 <p>See the <a 343 href="<?cs var:toroot ?>sdk/preview/start.html">Getting Started</a> document for more information 344 about how to set up the preview SDK and get started.</p> 345 <style type="text/css"> 346 .non-preview { display:none; } 347 </style> 348 349 <?cs else ?><?cs # it's normal offline docs ?> 350 351 <?cs ######## HERE IS THE JD DOC CONTENT FOR OFFLINE ######### ?> 352 <?cs call:tag_list(root.descr) ?> 353 <style type="text/css"> 354 body .offline { display:block; } 355 body .online { display:none; } 356 </style> 357 <script> 358 $('.reqs').show(); 359 </script> 360 <?cs /if ?> 361 362 <?cs /if ?> <?cs # end if/else online ?> 363 364<?cs /if ?> <?cs # end if/else NDK ?> 365 366<?cs /if ?> <?cs # end if/else redirect ?> 367 368 369</div><!-- end jd-content --> 370 371<?cs if:!sdk.redirect ?> 372<?cs include:"footer.cs" ?> 373<?cs /if ?> 374 375</div><!-- end g-unit --> 376 377<?cs include:"trailer.cs" ?> 378 379</body> 380</html> 381 382 383 384