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