blob: bb90cca81fd7ea4cadd18c4e2a7f1c433edee1cc [file] [log] [blame]
Scott Main50e990c2012-06-21 17:14:39 -07001fullpage=true
Dirk Dougherty3506ac82014-02-21 11:15:52 -08002page.title=Develop Apps
Scott Mainbbaf11f2014-03-27 13:01:56 -07003page.viewport_width=970
Dirk Dougherty3506ac82014-02-21 11:15:52 -08004meta.tags="develop, getstarted, sdk, appquality, landing"
5section.landing=true
Scott Main50e990c2012-06-21 17:14:39 -07006header.hide=1
7carousel=1
8tabbedList=1
Dirk Dougherty5f0462a2013-11-19 13:15:07 -08009excludeFromSuggestions=true
Scott Main50e990c2012-06-21 17:14:39 -070010@jd:body
11
12<style>
13#noplayer-message {
14position:absolute;top:50%;left:0;width:100%;z-index:-1;text-align:center;display:none;
15}
16#player-frame object {z-index:1;}
17</style>
18
19<div id="player-wrapper">
20 <div id="player-frame">
21 <div id="noplayer-message">
22 <!-- busted flash player message -->
23 Your video is supposed to appear here.<br/>
24 Make sure you have the <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash&reg; Player</a>.
25 </div>
26 <div id="player"><!-- Youtube embeds here... actually replaces this div --></div>
27 <a class="close" onclick="$('#player-wrapper').hide()">close video</a>
28 </div>
29</div>
Scott Main50e990c2012-06-21 17:14:39 -070030<div class="wrap">
31 <!-- Slideshow -->
32 <div class="slideshow-container slideshow-develop col-16">
33 <a href="" class="slideshow-prev">Prev</a>
34 <a href="" class="slideshow-next">Next</a>
35 <div class="frame">
36 <ul>
Robert Ly32c0cac2013-02-12 10:31:42 -080037
38 <li class="item carousel-home">
39 <div class="col-8">
Dirk Dougherty9ce329d2013-07-23 23:07:07 -070040 <img
41src="//lh4.ggpht.com/-lfjzgG5Dqrk/UHMThRtpRwI/AAAAAAAABpk/h4d3nsmkgPM/s400/mint.png"
42class="play no-shadow no-transform" />
43 </div>
44 <div class="content-right col-6">
45 <h2>Building Great Apps for Tablets</h2>
46 <p>Tablets are a fast-growing part of the Android installed base and they offer new opportunities for user engagement and monetization. If you are targeting tablets, check out this list of tips and techniques on how to deliver a great app experience for tablet users. </p>
47 <p><a
48href="//android-developers.blogspot.com/2012/11/designing-for-tablets-were-here-to-help.html" class="button">Read
49more</a></p>
50 </div>
51 </li>
52 <li class="item carousel-home">
53 <div class="col-8">
Scott Main99947692013-05-20 11:54:36 -070054 <img src="{@docRoot}images/google/gps-location.png"
55class="play no-shadow no-transform" style="margin:0 0 0 70px;height:230px;width:340px" />
56 </div>
57 <div class="content-right col-6" style="width:350px">
58 <h2>New Location APIs from Google</h2>
59 <p>The latest version of Google Play services includes new APIs that provide more
60 efficient and immediate user location data on devices running Android 2.2
61 and higher. Features include geofencing APIs, user activity recognition, and
62 power-efficient location updates.</p>
63 <p><a
64href="{@docRoot}google/play-services/location.html" class="button">Read more</a></p>
65 </div>
66 </li>
67
68 <li class="item carousel-home">
69 <div class="col-8">
Robert Ly32c0cac2013-02-12 10:31:42 -080070 <img src="{@docRoot}images/google/gps-plus-signin-hero.jpg"
71class="play no-shadow no-transform" style="margin:0 0 0 40px;max-height:250px;height:250px;
72 max-width:409px;width:409px" />
73 </div>
74 <div class="content-right col-6" style="width:350px">
Scott Main99947692013-05-20 11:54:36 -070075 <h2>New Cross-Platform Single Sign On</h2>
76 <p>Google+ Sign-In is an easy, trusted way to sign a user into your app.
77 Now it's even more seamless. A user can sign in to your app on one device and
78 pick it up on another&mdash;without signing in again. Best of all, it's built
79 into Google+ Sign-in, so there's no change needed in your app.</p>
Robert Ly32c0cac2013-02-12 10:31:42 -080080 <p><a
81href="{@docRoot}google/play-services/plus.html" class="button">Read more</a></p>
Scott Main99947692013-05-20 11:54:36 -070082 </div>
Robert Ly32c0cac2013-02-12 10:31:42 -080083 </li>
84
Dirk Dougherty76cdbdc2012-10-22 21:30:29 -070085 <li class="item carousel-home">
86 <div class="col-8">
Scott Main9748abb2012-11-29 14:28:44 -080087 <img src="{@docRoot}images/google/maps-v2-trulia-n7.png"
88class="play no-shadow no-transform" style="margin:0 0 0 40px;max-height:250px;height:250px;
Scott Mainb74844c2012-11-29 21:13:30 -080089 max-width:409px;width:409px" />
Scott Main9748abb2012-11-29 14:28:44 -080090 </div>
91 <div class="content-right col-6" style="width:350px">
Scott Mainaaaa1562012-12-03 09:19:10 -080092 <h2>New Google Maps Android APIs!</h2>
Scott Main9748abb2012-11-29 14:28:44 -080093 <p>Google Maps Android API version 2 is now available with enhanced
94 features such as 3D buildings, vector-based map tiles, rich overlay capabilities,
95 indoor maps, support for fragments, and much more.</p>
96
97 <p>The APIs are bundled with Google Play services and are
98 compatible with Android 2.2 and higher.</p>
99 <p><a
100href="{@docRoot}google/play-services/maps.html" class="button">Read more</a></p>
101 </div>
102 </li>
Scott Main50e990c2012-06-21 17:14:39 -0700103 </ul>
104 </div>
105 </div>
106 <!-- /End slideshow -->
107</div>
108<div class="wrap">
109 <!-- news and feature feed -->
110 <div class="feed col-8" style="margin-left:0">
111 <ul class="feed-nav">
112 <li class="active">DEVELOPER NEWS</li>
113 <li>FEATURED DOCS</li>
114 </ul>
115 <div class="feed-container">
116 <div class="feed-frame">
117 <!-- DEVELOPER NEWS -->
Dirk Dougherty76cdbdc2012-10-22 21:30:29 -0700118 <ul>
Dirk Dougherty9ce329d2013-07-23 23:07:07 -0700119 <li><a href="//android-developers.blogspot.com/2013/07/making-beautiful-android-app-icons.html">
120 <div class="feed-image" style="background:url('//2.bp.blogspot.com/-HfoO6KNFBKA/UeiyRoELb7I/AAAAAAAAAFs/bHR-5viktU4/s1000/icons.png') no-repeat 0 0;background-size:500px;background-position:center center;"></div>
121 <h4>Making Beautiful Android App Icons</h4>
122 <p>As higher density screens gain popularity, it's important to make sure your launcher icon is crisp and high quality...</p>
123 </a></li>
124 <li><a href="//android-developers.blogspot.com/2013/07/beautiful-design-collection-summer-2013.html">
125 <div class="feed-image" style="background:url('//1.bp.blogspot.com/-k8DZYu0daT4/UdRt1AzstvI/AAAAAAAAAFM/CvEkb2yh-i0/s965/beautifulapps_4.png') no-repeat 0 0"></div>
126 <h4>The Beautiful Design Summer 2013 Collection</h4>
Dirk Dougherty2ffbfba2013-07-30 10:46:50 -0700127 <p>See the apps chosen by the Android Design team for their masterfully crafted design details...</p>
Dirk Dougherty9ce329d2013-07-23 23:07:07 -0700128 </a></li>
Dirk Doughertyad209a92013-10-20 12:47:43 -0700129 <li><a href="//android-developers.blogspot.com/2013/10/new-developer-features-in-google-play.html">
130 <div class="feed-image" style="background:url('//3.bp.blogspot.com/-k33rf398Lqw/UlRUMQQRUNI/AAAAAAAAClM/pSwz2YgQpmY/s1600/gps-play_games_logo.png') no-repeat 0 0;background-size:130px;background-position:8px -4px;"></div>
131 <h4>New Features in Google Play Games</h4>
132 <p>Three new features that make it easier to understand what players are doing in your game and help you manage game features...</p>
Dirk Dougherty9ce329d2013-07-23 23:07:07 -0700133 </a></li>
Scott Main99947692013-05-20 11:54:36 -0700134 <li><a href="//android-developers.blogspot.com/2013/05/new-ways-to-optimize-your-business-in.html">
Dirk Dougherty809b0842013-10-31 14:01:56 -0700135 <div class="feed-image" style="background:url('//3.bp.blogspot.com/-_8WvpdTVGsE/UkxxxrVoNNI/AAAAAAAACj8/FrQyA-BO11c/s1600/gp-referral-ga.png') no-repeat 0 0;background-size:180px"></div>
Dirk Doughertyad209a92013-10-20 12:47:43 -0700136 <h4>Linking Google Analytics with Google Play</h4>
137 <p>Understanding your users easier through a new integration between Google Analytics and the Google Play Developer Console...</p>
Scott Main99947692013-05-20 11:54:36 -0700138 </a></li>
Dirk Dougherty76cdbdc2012-10-22 21:30:29 -0700139 </ul>
Scott Main50e990c2012-06-21 17:14:39 -0700140 <!-- FEATURED DOCS -->
Dirk Dougherty76cdbdc2012-10-22 21:30:29 -0700141 <ul>
142 <li><a href="{@docRoot}distribute/googleplay/spotlight/tablets.html">
143 <h4>Tablet Stories</h4>
144 <p>More developers are investing in a full tablet experience for their apps. Here are some stories from developers who are seeing real results as they expand their offering to include Android tablets. </p>
145 </a></li>
146 <li><a href="{@docRoot}distribute/googleplay/quality/core.html">
147 <h4>Core App Quality Guidelines</h4>
148 <p>This document helps you assess basic aspects of quality in your app through a compact set of core app quality criteria and associated tests. All Android apps should meet these criteria.</p>
149 </a></li>
150 <li><a href="{@docRoot}guide/topics/ui/notifiers/notifications.html">
151 <h4>Updated Notifications API Guide</h4>
152 <p>The Notifications API Guide is updated to include information about building Jelly Bean rich notifications using the Support Library APIs for backwards-compatibility.</p>
153 </a></li>
154 <li><a href="{@docRoot}guide/topics/ui/dialogs.html">
155 <h4>Updated Dialogs API Guide</h4>
156 <p>The Dialogs API Guide now shows to use DialogFragment class, a simpler way to manage your dialogs and embed them in alternative layouts.</p>
157 </a></li>
158 </ul>
Scott Main50e990c2012-06-21 17:14:39 -0700159 </div>
160 </div>
161 </div> <!-- /news and feature feed -->
162 <!-- video feed -->
163 <div class="feed col-8" style="margin-right:0">
164 <ul class="feed-nav">
165 <li class="active">DEVELOPERS LIVE</li>
166 <li>VIDEO PLAYLISTS</li>
167 </ul>
168 <div class="feed-container">
169 <div class="feed-frame">
Dirk Dougherty76cdbdc2012-10-22 21:30:29 -0700170 <ul id="DevelopersLive">
171 </ul>
172 <ul id="VideoPlaylists">
173 </ul>
Scott Main50e990c2012-06-21 17:14:39 -0700174 </div>
175 </div>
176 </div>
177 <!-- /video feed -->
178</div>
179
180<br class="clearfix"/>
Scott Main50e990c2012-06-21 17:14:39 -0700181
182
183
184
185
186
187
188
189
190
191<script src="//swfobject.googlecode.com/svn/trunk/swfobject/swfobject.js" type="text/javascript"></script>
192<script type="text/javascript">
193
194/* Load a video into the player box.
195 * @param id The YouTube video ID
196 * @param title The video title to display in the player box (character escaped)
197 * @param autoplay Whether to automatically play the video
198 */
199function loadVideo(id, title, autoplay) {
200 swfobject.embedSWF('//www.youtube.com/v/' + id + '&rel=1&border=0&fs=1&autoplay=' +
201 (autoplay?1:0), 'player', '525', '330', '9.0.0', false, false, {allowfullscreen: 'true'});
202 $("#videoPlayerTitle").html("<h2>" + unescape(title) + "</h2>");
203 $("#player-wrapper").show();
204 setTimeout(function(){$('#noplayer-message').show()}, 2000);
205}
206
207/* Draw all videos from a playlist into a 'videoPreviews' list
208 * @param data The feed data returned from the youtube request
209 */
210function renderVideoPlaylists(data) {
211 var MAX_LIST_DESC_LENGTH = 130; // the length at which we will trim the description
212 var MAX_VIDEO_DESC_LENGTH = 100; // the length at which we will trim the description
213 var MAX_LIST_LENGTH = 4; // number of videos to put in the list
214 var feed = data.feed;
215 var entries = feed.entry || [];
216 var playlistId = feed.yt$playlistId.$t;
217
218 var $ulVideos = $('<ul style="display:none"/>');
219 var summary = feed.media$group.media$description != null ? feed.media$group.media$description.$t : feed.subtitle.$t;
220
221 var $liPlaylist = $('<li class="playlist"></li>');
222 var $aPlaylist = $('<a href="" onclick="togglePlaylist(this);return false;"></a>');
223 $liPlaylist.append($aPlaylist);
224 $aPlaylist.append('<h4>' + feed.title.$t + '</h4>');
225
226 var playlistDescription = summary.substr(0, MAX_LIST_DESC_LENGTH);
227 playlistDescription += playlistDescription.length == MAX_LIST_DESC_LENGTH ? "..." : ""; // add ellipsis if we've chopped the description
228 $aPlaylist.append('<p>' + playlistDescription + '</p>');
229
230 // Loop through each entry (each video) and add it to the 'videoPreviews' list
231 var length = feed.entry.length < MAX_LIST_LENGTH ? feed.entry.length : MAX_LIST_LENGTH; // max of 4 videos per list
232 for (var i = 0; i < length; i++) {
233 var entry = entries[i];
234
235 var title = entry.title.$t;
236 var id = entry.media$group.yt$videoid.$t;
237 var thumbUrl = entry.media$group.media$thumbnail[0].url;
238 var fullDescription = entry.media$group.media$description.$t;
239 var playerUrl = entry.media$group.media$content[0].url;
240
241 var shortDescription = fullDescription.substr(0, MAX_VIDEO_DESC_LENGTH);
242 shortDescription += shortDescription.length == MAX_VIDEO_DESC_LENGTH ? "..." : ""; // add ellipsis if we've chopped the description
243
244 var img = $('<img src="' + thumbUrl + '" width="60" height="45"/>');
245 var a = $('<a href="#" onclick="loadVideo(\'' + id + '\',\'' + escape(title) + '\',true); return false;" />');
246 var pShortDescription = $('<p>' + shortDescription + '</p>');
247 var h5Title = "<h5>" + title + "</h5>";
248 var li = $('<li class="playlist-video"/>');
249
250 li.append(a);
251 a.append(img).append(h5Title).append(pShortDescription);
252
253 $ulVideos.append(li);
254
255 // use the first entry's thumbnail for the playlist
256 if (i == 0) {
257 $aPlaylist.prepend('<img src="' + thumbUrl + '" width="120" height="90"/>');
258 }
259 }
260
261 if (feed.entry.length > MAX_LIST_LENGTH) {
262 // add item to go to youtube for playlist
Scott Main99947692013-05-20 11:54:36 -0700263 $ulVideos.append('<li class="more"><a href="//www.youtube.com/playlist?list=' + playlistId + '">More &raquo;</a></li>');
Scott Main50e990c2012-06-21 17:14:39 -0700264 }
265
266 $liPlaylist.append($ulVideos);
267 $('#VideoPlaylists').append($liPlaylist);
268}
269
270
271function renderDevelopersLivePlaylist(data) {
272
273 var MAX_DESC_LENGTH = 125; // the length at which we will trim the description
274 var feed = data.feed;
275 var entries = feed.entry || [];
276 var playlistId = feed.yt$playlistId.$t;
277
278 var ul = $('#DevelopersLive');
279
280 // Loop through each entry (each video) and add it to the '#DevelopersLive' list
281 for (var i = 0; i < 4; i++) {
282 var entry = entries[i];
283
284 var title = entry.title.$t;
285 var id = entry.media$group.yt$videoid.$t;
286 var thumbUrl = entry.media$group.media$thumbnail[0].url;
287 var fullDescription = entry.media$group.media$description.$t;
288 var playerUrl = entry.media$group.media$content[0].url;
289 var shortDescription = fullDescription.substr(0, MAX_DESC_LENGTH);
290 shortDescription += shortDescription.length == MAX_DESC_LENGTH ? "..." : ""; // add ellipsis if we've chopped the description
291
292 var img = $('<img src="' + thumbUrl + '" width="120" height="90"/>');
293 var a = $('<a href="#" onclick="loadVideo(\'' + id + '\',\'' + escape(title) + '\',true); return false;" />');
294 var pShortDescription = $('<p>' + shortDescription + '</p>');
295 var h4Title = "<h4>" + title + "</h4>";
296 var li = $('<li/>');
297
298 li.append(a);
299 a.append(img).append(h4Title).append(pShortDescription);
300
301 ul.append(li);
302 }
303}
304
Scott Main50e990c2012-06-21 17:14:39 -0700305/* This 'playlist' object defines the playlist IDs for each tab.
306 * Each name inside 'playlist' corresponds to class names for the tab that the playlists belong to (eg: "googleioTab" and "googleioBox" divs).
307 * Each string in 'ids' is the ID of a YouTube playlist that belongs in the corresponding tab.
308 */
309var playlists = {
Scott Mainbce26802012-11-15 10:26:40 -0800310 'designinaction' : {
311 'ids': ["PLWz5rJ2EKKc8j2B95zGMb8muZvrIy-wcF"]
Scott Main50e990c2012-06-21 17:14:39 -0700312 },
Scott Main99947692013-05-20 11:54:36 -0700313 'bizdevbytes' : {
314 'ids': ["PLWz5rJ2EKKc8-Osr0TuHyTMEhKV0xJ6ql"]
Scott Mainbce26802012-11-15 10:26:40 -0800315 },
Scott Main41b08da2013-06-17 17:47:36 -0700316 'thisweek' : {
317 'ids': ["PLWz5rJ2EKKc9Wam5jE-9oY8l6RpeAx-XM"]
Scott Mainbce26802012-11-15 10:26:40 -0800318 },
319 'googleio' : {
Scott Main99947692013-05-20 11:54:36 -0700320 'ids': ["PLWz5rJ2EKKc9WGUwq2gQ-coU3fSyexgOx"]
Scott Main50e990c2012-06-21 17:14:39 -0700321 }
322};
323
324/* Request the playlist feeds from YouTube */
325function showVideosPlaylists() {
326 for (var x in playlists) {
327 var ids = playlists[x].ids;
328 for (var i in ids) {
329 var script = "<script type='text/javascript' src='//gdata.youtube.com/feeds/api/playlists/"
330 + ids[i] +
Scott Main99947692013-05-20 11:54:36 -0700331 "?v=2&alt=json-in-script&max-results=50&callback=renderVideoPlaylists&orderby=position'><\/script>";
Scott Main50e990c2012-06-21 17:14:39 -0700332 $("body").append(script);
333 }
334 }
335}
336
337
338/* Request the playlist feeds from YouTube */
339function showDevelopersLivePlaylist() {
Scott Main5b61ad22013-01-15 11:18:48 -0800340 var playlistId = "PLWz5rJ2EKKc_XOgcRukSoKKjewFJZrKV0"; /* DevBytes */
Scott Main50e990c2012-06-21 17:14:39 -0700341 var script = "<script type='text/javascript' src='//gdata.youtube.com/feeds/api/playlists/"
342 + playlistId +
Scott Main99947692013-05-20 11:54:36 -0700343 "?v=2&alt=json-in-script&max-results=10&callback=renderDevelopersLivePlaylist&orderby=position'><\/script > ";
Scott Main50e990c2012-06-21 17:14:39 -0700344 $("body").append(script);
345}
346
347
348function togglePlaylist(listLink) {
349 var $list = $(listLink).parent();
350 var $ul = $list.find('ul');
351 if ($ul.is(":visible")) {
352 $ul.slideUp(function() {
353 $list.css({'height':'inherit'});
354 });
355 } else {
356 $list.closest('ul').find('li.playlist').find('ul').slideUp();
357 $ul.slideDown();
358 $list.css({'height':'auto'});
359 }
360}
361
362showDevelopersLivePlaylist();
363showVideosPlaylists();
Dirk Dougherty49be1ef2012-11-29 21:11:24 -0800364</script>