blob: 1785fa09a8c6dda700dbfb68d6be0667697675e4 [file] [log] [blame]
Dirk Dougherty541b4942014-02-14 18:31:53 -08001<?cs include:"doctype.cs" ?>
2<?cs include:"macros.cs" ?>
Dirk Dougherty82e929d2016-01-30 14:04:37 -08003<?cs include:"../../../../frameworks/base/docs/html/sdk/sdk_vars.cs" ?>
Dirk Dougherty541b4942014-02-14 18:31:53 -08004<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 ?>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -080015<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
Dirk Dougherty541b4942014-02-14 18:31:53 -080019 /if ?>" itemscope itemtype="http://schema.org/CreativeWork">
20 <a name="top"></a>
21<?cs include:"header.cs" ?>
22
Dirk Doughertyc607a4d2016-01-28 08:32:47 -080023
24<div <?cs if:fullpage
25?><?cs else
26?>class="col-13" id="doc-col"<?cs /if ?> >
27
Dirk Dougherty541b4942014-02-14 18:31:53 -080028<?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#
Dirk Doughertyc607a4d2016-01-28 08:32:47 -080047?>
Dirk Dougherty541b4942014-02-14 18:31:53 -080048
Amanda Kassay01febb92016-04-18 12:55:17 -040049<?cs if:(header.hide||devsite)?><?cs else ?>
Dirk Dougherty541b4942014-02-14 18:31:53 -080050<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>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -080084 <th>SHA1 Checksum</th>
Dirk Dougherty541b4942014-02-14 18:31:53 -080085 </tr>
86 <tr>
87 <td>Windows 32-bit</td>
88 <td>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -080089 <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>
Dirk Dougherty541b4942014-02-14 18:31:53 -080091 </td>
92 <td><?cs var:ndk.win32_bytes ?></td>
93 <td><?cs var:ndk.win32_checksum ?></td>
94 </tr>
Dirk Dougherty541b4942014-02-14 18:31:53 -080095 <tr>
96 <td>Windows 64-bit</td>
97 <td>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -080098 <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>
Dirk Dougherty541b4942014-02-14 18:31:53 -0800100 </td>
101 <td><?cs var:ndk.win64_bytes ?></td>
102 <td><?cs var:ndk.win64_checksum ?></td>
Dirk Doughertye21bed22014-05-02 15:14:04 -0700103 </tr>
Dirk Dougherty541b4942014-02-14 18:31:53 -0800104 <tr>
Dirk Dougherty541b4942014-02-14 18:31:53 -0800105 <td>Mac OS X 64-bit</td>
106 <td>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800107 <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>
Dirk Dougherty541b4942014-02-14 18:31:53 -0800109 </td>
110 <td><?cs var:ndk.mac64_bytes ?></td>
111 <td><?cs var:ndk.mac64_checksum ?></td>
112 </tr>
Dirk Dougherty541b4942014-02-14 18:31:53 -0800113 <tr>
114 <td>Linux 64-bit (x86)</td>
115 <td>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800116 <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>
Dirk Dougherty541b4942014-02-14 18:31:53 -0800118 </td>
119 <td><?cs var:ndk.linux64_bytes ?></td>
120 <td><?cs var:ndk.linux64_checksum ?></td>
121 </tr>
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700122
Dirk Dougherty541b4942014-02-14 18:31:53 -0800123 </table>
Dirk Doughertye21bed22014-05-02 15:14:04 -0700124
Dirk Dougherty541b4942014-02-14 18:31:53 -0800125 <?cs ######## HERE IS THE JD DOC CONTENT ######### ?>
126 <?cs call:tag_list(root.descr) ?>
127
128
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800129<?cs ######## The NDK version of the download script ######### ?>
Dirk Dougherty541b4942014-02-14 18:31:53 -0800130<script>
131 function onDownload(link) {
132
133 $("#downloadForRealz").html("Download " + $(link).text());
134 $("#downloadForRealz").attr('href',$(link).attr('href'));
135
Dirk Dougherty541b4942014-02-14 18:31:53 -0800136 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
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800148
149 function onDownloadForRealz(link) {
Dirk Dougherty541b4942014-02-14 18:31:53 -0800150 if ($("input#agree").is(':checked')) {
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800151 $("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);
Dirk Dougherty541b4942014-02-14 18:31:53 -0800161 });
smain@google.com72818022016-04-04 16:17:01 -0700162 ga('send', 'event', 'SDK', 'NDK tools', $("#downloadForRealz").html());
Dirk Dougherty541b4942014-02-14 18:31:53 -0800163 return true;
164 } else {
Dirk Dougherty541b4942014-02-14 18:31:53 -0800165 return false;
166 }
167 }
168
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800169
Dirk Dougherty541b4942014-02-14 18:31:53 -0800170 $(window).hashchange( function(){
171 if (location.hash == "") {
172 location.reload();
173 }
174 });
175
176</script>
177
178 <?cs else ?>
Dirk Doughertye21bed22014-05-02 15:14:04 -0700179<?cs # end if NDK ...
Dirk Dougherty541b4942014-02-14 18:31:53 -0800180#
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
smain@google.com6f0ed9b2016-05-02 14:18:31 -0700201<?cs ####### TODO: Remove this whole file from processing. ######## ?>
Dirk Dougherty541b4942014-02-14 18:31:53 -0800202
203
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800204<?cs ######## The Android Studio version of the download script ######### ?>
Dirk Dougherty541b4942014-02-14 18:31:53 -0800205<script>
Dirk Dougherty541b4942014-02-14 18:31:53 -0800206 var os;
207 var bundlename;
208 var $toolslink;
209
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700210 if (navigator.appVersion.indexOf("Mobile")!=-1) {
211 // Do nothing for any "mobile" user agent
212 } else if (navigator.appVersion.indexOf("Win")!=-1) {
Dirk Dougherty541b4942014-02-14 18:31:53 -0800213 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');
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700220 } else if (navigator.appVersion.indexOf("Linux")!=-1 && navigator.appVersion.indexOf("Android")==-1) {
Dirk Dougherty541b4942014-02-14 18:31:53 -0800221 os = "Linux";
222 bundlename = '#linux-bundle';
223 $toolslink = $('#linux-tools');
224 }
225
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700226 if (os != undefined) {
Dirk Dougherty541b4942014-02-14 18:31:53 -0800227 $('#not-supported').hide();
228
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700229 /* set up primary Android Studio download button */
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800230 idname = bundlename + "-size";
231 sizeMB = $(idname).text().split(' MB')[0];
232 $('.download-bundle-button > .small').html(" for " + os + " <em>(" + sizeMB + " MB)</em>");
Amanda Kassayc6d9cdc2016-04-27 15:01:21 -0400233 $('.download-bundle-button').click(function() { onDownload(this,true,true);}).attr('href', bundlename);
Dirk Dougherty541b4942014-02-14 18:31:53 -0800234 }
Dirk Doughertye21bed22014-05-02 15:14:04 -0700235
236
Dirk Dougherty541b4942014-02-14 18:31:53 -0800237 function onDownload(link, button, bundle) {
Dirk Doughertye21bed22014-05-02 15:14:04 -0700238
Dirk Dougherty541b4942014-02-14 18:31:53 -0800239 /* set text for download button */
240 if (button) {
241 $("#downloadForRealz").html($(link).text());
242 } else {
243 $("#downloadForRealz").html("Download " + $(link).text());
244 }
Dirk Doughertye21bed22014-05-02 15:14:04 -0700245
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700246 $("#downloadForRealz").attr('bundle', bundle);
Dirk Dougherty0dc81b92015-12-08 14:49:52 -0800247 if (bundle && !button) {
248 $("a#downloadForRealz").attr("name", "#" + $(link).attr('id'));
249 } else {
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800250 $("h2#tos-header").text('Download the Android SDK Tools');
Dirk Dougherty0dc81b92015-12-08 14:49:52 -0800251 $("a#downloadForRealz").attr("name", $(link).attr('href'));
252 }
Dirk Dougherty541b4942014-02-14 18:31:53 -0800253
Dirk Dougherty541b4942014-02-14 18:31:53 -0800254 return false;
255 }
256
257
258 function onAgreeChecked() {
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700259 /* verify that the TOS is agreed */
260 if ($("input#agree").is(":checked")) {
Dirk Doughertye21bed22014-05-02 15:14:04 -0700261
Dirk Dougherty541b4942014-02-14 18:31:53 -0800262 /* if downloading the bundle */
263 if ($("#downloadForRealz").attr('bundle')) {
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700264 /* construct the name of the link we want */
265 linkId = $("a#downloadForRealz").attr("name");
Dirk Dougherty541b4942014-02-14 18:31:53 -0800266 /* set the real url for download */
267 $("a#downloadForRealz").attr("href", $(linkId).attr("href"));
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700268 } else {
269 $("a#downloadForRealz").attr("href", $("a#downloadForRealz").attr("name"));
Dirk Dougherty541b4942014-02-14 18:31:53 -0800270 }
Dirk Doughertye21bed22014-05-02 15:14:04 -0700271
Dirk Dougherty541b4942014-02-14 18:31:53 -0800272 /* reveal the download button */
273 $("a#downloadForRealz").removeClass('disabled');
274 } else {
275 $("a#downloadForRealz").addClass('disabled');
276 }
277 }
278
279 function onDownloadForRealz(link) {
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700280 if ($("input#agree").is(':checked')) {
Dirk Dougherty541b4942014-02-14 18:31:53 -0800281 $("div.sdk-terms").slideUp();
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800282 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 }
Dirk Doughertyff233cc2015-05-04 14:37:05 -0700299 ga('send', 'event', 'SDK', 'IDE and Tools', $("#downloadForRealz").html());
Dirk Dougherty541b4942014-02-14 18:31:53 -0800300 return true;
301 } else {
Dirk Dougherty541b4942014-02-14 18:31:53 -0800302 return false;
303 }
304 }
305
306 $(window).hashchange( function(){
307 if (location.hash == "") {
308 location.reload();
309 }
310 });
311
312</script>
313
314
315
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800316
Dirk Dougherty541b4942014-02-14 18:31:53 -0800317<?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>
Dirk Doughertye21bed22014-05-02 15:14:04 -0700328
Dirk Dougherty541b4942014-02-14 18:31:53 -0800329 <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>
Dirk Doughertye21bed22014-05-02 15:14:04 -0700335
Dirk Dougherty541b4942014-02-14 18:31:53 -0800336 <?cs else ?><?cs # it's normal offline docs ?>
Dirk Doughertye21bed22014-05-02 15:14:04 -0700337
Dirk Dougherty541b4942014-02-14 18:31:53 -0800338 <?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; }
Dirk Doughertye21bed22014-05-02 15:14:04 -0700343 </style>
Dirk Dougherty541b4942014-02-14 18:31:53 -0800344 <script>
345 $('.reqs').show();
346 </script>
347 <?cs /if ?>
Dirk Doughertye21bed22014-05-02 15:14:04 -0700348
Dirk Dougherty541b4942014-02-14 18:31:53 -0800349 <?cs /if ?> <?cs # end if/else online ?>
Dirk Doughertye21bed22014-05-02 15:14:04 -0700350
Dirk Dougherty541b4942014-02-14 18:31:53 -0800351<?cs /if ?> <?cs # end if/else NDK ?>
352
353<?cs /if ?> <?cs # end if/else redirect ?>
354
355
356</div><!-- end jd-content -->
357
Amanda Kassay01febb92016-04-18 12:55:17 -0400358<?cs if:!sdk.redirect && !devsite ?>
Dirk Dougherty541b4942014-02-14 18:31:53 -0800359<?cs include:"footer.cs" ?>
360<?cs /if ?>
361
362</div><!-- end g-unit -->
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800363
Dirk Dougherty541b4942014-02-14 18:31:53 -0800364<?cs include:"trailer.cs" ?>
Amanda Kassayc6d9cdc2016-04-27 15:01:21 -0400365<?cs if:!devsite ?>
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800366<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>
Amanda Kassayc6d9cdc2016-04-27 15:01:21 -0400371<?cs /if ?><!--end !devsite -->
372
Dirk Doughertyc607a4d2016-01-28 08:32:47 -0800373
Dirk Dougherty541b4942014-02-14 18:31:53 -0800374<!-- 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>