Skip to content

Commit 28a3897

Browse files
committed
docs: re-add download.jd file to support archived SDK downloads
Change-Id: If814238c8fa017ce10e7fe770826a1e162fe5e87
1 parent 1ed1c39 commit 28a3897

File tree

2 files changed

+429
-0
lines changed

2 files changed

+429
-0
lines changed

docs/html/sdk/download.jd

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
page.title=Download an Archived Android SDK
2+
hide_license_footer=true
3+
4+
@jd:body
5+
6+
<script type="text/javascript">
7+
function verify() {
8+
document.getElementById('download-button').disabled =
9+
!document.getElementById('checkbox').checked;
10+
}
11+
function submit() {
12+
var location = window.location.href;
13+
if (location.indexOf('?v=') != -1) {
14+
var filename = location.substring(location.indexOf('=')+1,location.length);
15+
if (document.getElementById('checkbox').checked) {
16+
document.location = "http://dl.google.com/android/" + filename;
17+
}
18+
document.getElementById('click-download').setAttribute("href", "http://dl.google.com/android/"
19+
+ filename);
20+
$("#terms-form").hide(500);
21+
$("#next-steps").show(500);
22+
document.getElementById('checkbox').disabled=true;
23+
document.getElementById('download-button').disabled=true;
24+
} else {
25+
alert("You have not selected an SDK version. Please return to the SDK Archives page");
26+
}
27+
}
28+
</script>
29+
30+
<div id="terms-form">
31+
<p>Please carefully review the Android SDK License Agreement before downloading the SDK.
32+
The License Agreement constitutes a contract between you and Google with respect to your use of the
33+
SDK.</p>
34+
<p class="note"><strong>Note:</strong> You must agree to this license agreement in order to
35+
download one of the archived SDKs, because these SDK packages contain Google software (whereas, the
36+
<a href="http://developer.android.com/sdk/index.html">current SDK</a> packages do not require a
37+
license agreement, because they contain only the open sourced SDK tools).</p>
38+
39+
<iframe id="terms" style="border:1px solid #888;margin:0 0 1em;height:400px;width:100%;"
40+
src="terms_body.html">
41+
</iframe>
42+
43+
<p>
44+
<input type="checkbox" id="checkbox" onclick="verify()" />
45+
<label for="checkbox">I agree to the terms of the Android SDK License Agreement.</label>
46+
</p>
47+
<p>
48+
<input type="submit" value="Download" id="download-button" disabled="disabled"
49+
onclick="submit()" />
50+
</p>
51+
<p>
52+
<script language="javascript">
53+
var loc = window.location.href;
54+
if (loc.indexOf('?v=') != -1) {
55+
var filename = loc.substring(loc.indexOf('=')+1,loc.length);
56+
document.write("File: " + filename);
57+
}
58+
</script>
59+
</p>
60+
</div><!-- end terms-form -->
61+
62+
<noscript>
63+
<p><strong>Please enable Javascript in your browser in order to agree to the terms and download
64+
the SDK.</strong></p>
65+
</noscript>
66+
67+
<div class="special" id="next-steps" style="display:none">
68+
<p>Your download should be underway. If not, <a id="click-download">click here to start the
69+
download</a>.</p>
70+
<p>Beware that you've just downloaded a very old version of the Android SDK, which is not
71+
recommended. We no longer maintain documentation about how to install these archived SDKs nor
72+
support the tools contained within.</p>
73+
<p>We recommend that you instead download the latest <a
74+
href="http://developer.android.com/sdk/index.html">Android SDK starter package</a>, which includes
75+
the latest SDK tools and allows you to develop against any version of the Android platform, back to
76+
Android 1.1.</p>
77+
</div>
78+
79+
<script type="text/javascript">
80+
var loc = window.location.href;
81+
var filename = loc.substring(loc.indexOf('=')+1,loc.length);
82+
version = filename.substring(filename.indexOf('.')-1,filename.lastIndexOf('.'));
83+
$(".addVersionPath").each(function(i) {
84+
var oldHref = $(this).attr("href");
85+
$(this).attr({href: "/sdk/" + version + "/" + oldHref});
86+
});
87+
</script>
88+
89+
90+
91+
92+

0 commit comments

Comments
 (0)