blob: e89e228ea0585a46d26518a6be412c2d96fa79d8 [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">
smain@google.come1c95082014-10-16 23:17:52 -070040 <img
41 style="max-height: 250px; margin-top:5px;
42 margin-left: 30px; max-width: 451px;"
43src="{@docRoot}design/tv/images/focus.png"
44class="play no-shadow no-transform" />
45 </div>
46 <div class="content-right col-6">
47 <h2>Create Quality Apps for TV</h2>
48 <p>Now that the Android platform has
49 extended to TVs, your apps on Google Play have
50 a new opportunity for engagement in the
51 living room. To provide the best
52 "leanback" experience on the couch, follow
53 this quality checklist.</p>
54 <p><a
55href="{@docRoot}distribute/essentials/quality/tv.html" class="button">Read
56more</a></p>
57 </div>
58 </li>
59
60 <li class="item carousel-home">
61 <div class="col-8">
Dirk Dougherty9ce329d2013-07-23 23:07:07 -070062 <img
63src="//lh4.ggpht.com/-lfjzgG5Dqrk/UHMThRtpRwI/AAAAAAAABpk/h4d3nsmkgPM/s400/mint.png"
64class="play no-shadow no-transform" />
65 </div>
66 <div class="content-right col-6">
67 <h2>Building Great Apps for Tablets</h2>
68 <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>
69 <p><a
70href="//android-developers.blogspot.com/2012/11/designing-for-tablets-were-here-to-help.html" class="button">Read
71more</a></p>
72 </div>
73 </li>
74 <li class="item carousel-home">
75 <div class="col-8">
Scott Main99947692013-05-20 11:54:36 -070076 <img src="{@docRoot}images/google/gps-location.png"
77class="play no-shadow no-transform" style="margin:0 0 0 70px;height:230px;width:340px" />
78 </div>
79 <div class="content-right col-6" style="width:350px">
80 <h2>New Location APIs from Google</h2>
81 <p>The latest version of Google Play services includes new APIs that provide more
82 efficient and immediate user location data on devices running Android 2.2
83 and higher. Features include geofencing APIs, user activity recognition, and
84 power-efficient location updates.</p>
85 <p><a
86href="{@docRoot}google/play-services/location.html" class="button">Read more</a></p>
87 </div>
88 </li>
89
90 <li class="item carousel-home">
91 <div class="col-8">
Robert Ly32c0cac2013-02-12 10:31:42 -080092 <img src="{@docRoot}images/google/gps-plus-signin-hero.jpg"
93class="play no-shadow no-transform" style="margin:0 0 0 40px;max-height:250px;height:250px;
94 max-width:409px;width:409px" />
95 </div>
96 <div class="content-right col-6" style="width:350px">
Scott Main99947692013-05-20 11:54:36 -070097 <h2>New Cross-Platform Single Sign On</h2>
98 <p>Google+ Sign-In is an easy, trusted way to sign a user into your app.
99 Now it's even more seamless. A user can sign in to your app on one device and
100 pick it up on another&mdash;without signing in again. Best of all, it's built
101 into Google+ Sign-in, so there's no change needed in your app.</p>
Robert Ly32c0cac2013-02-12 10:31:42 -0800102 <p><a
103href="{@docRoot}google/play-services/plus.html" class="button">Read more</a></p>
Scott Main99947692013-05-20 11:54:36 -0700104 </div>
Robert Ly32c0cac2013-02-12 10:31:42 -0800105 </li>
106
Dirk Dougherty76cdbdc2012-10-22 21:30:29 -0700107 <li class="item carousel-home">
108 <div class="col-8">
Scott Main9748abb2012-11-29 14:28:44 -0800109 <img src="{@docRoot}images/google/maps-v2-trulia-n7.png"
110class="play no-shadow no-transform" style="margin:0 0 0 40px;max-height:250px;height:250px;
Scott Mainb74844c2012-11-29 21:13:30 -0800111 max-width:409px;width:409px" />
Scott Main9748abb2012-11-29 14:28:44 -0800112 </div>
113 <div class="content-right col-6" style="width:350px">
Scott Mainaaaa1562012-12-03 09:19:10 -0800114 <h2>New Google Maps Android APIs!</h2>
Scott Main9748abb2012-11-29 14:28:44 -0800115 <p>Google Maps Android API version 2 is now available with enhanced
116 features such as 3D buildings, vector-based map tiles, rich overlay capabilities,
117 indoor maps, support for fragments, and much more.</p>
118
119 <p>The APIs are bundled with Google Play services and are
120 compatible with Android 2.2 and higher.</p>
121 <p><a
122href="{@docRoot}google/play-services/maps.html" class="button">Read more</a></p>
123 </div>
124 </li>
Scott Main50e990c2012-06-21 17:14:39 -0700125 </ul>
126 </div>
127 </div>
128 <!-- /End slideshow -->
129</div>
130<div class="wrap">
131 <!-- news and feature feed -->
132 <div class="feed col-8" style="margin-left:0">
133 <ul class="feed-nav">
134 <li class="active">DEVELOPER NEWS</li>
135 <li>FEATURED DOCS</li>
136 </ul>
137 <div class="feed-container">
138 <div class="feed-frame">
139 <!-- DEVELOPER NEWS -->
Dirk Dougherty76cdbdc2012-10-22 21:30:29 -0700140 <ul>
Dirk Dougherty9ce329d2013-07-23 23:07:07 -0700141 <li><a href="//android-developers.blogspot.com/2013/07/making-beautiful-android-app-icons.html">
142 <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>
143 <h4>Making Beautiful Android App Icons</h4>
144 <p>As higher density screens gain popularity, it's important to make sure your launcher icon is crisp and high quality...</p>
145 </a></li>
146 <li><a href="//android-developers.blogspot.com/2013/07/beautiful-design-collection-summer-2013.html">
147 <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>
148 <h4>The Beautiful Design Summer 2013 Collection</h4>
Dirk Dougherty2ffbfba2013-07-30 10:46:50 -0700149 <p>See the apps chosen by the Android Design team for their masterfully crafted design details...</p>
Dirk Dougherty9ce329d2013-07-23 23:07:07 -0700150 </a></li>
Dirk Doughertyad209a92013-10-20 12:47:43 -0700151 <li><a href="//android-developers.blogspot.com/2013/10/new-developer-features-in-google-play.html">
152 <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>
153 <h4>New Features in Google Play Games</h4>
154 <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 -0700155 </a></li>
Scott Main99947692013-05-20 11:54:36 -0700156 <li><a href="//android-developers.blogspot.com/2013/05/new-ways-to-optimize-your-business-in.html">
Dirk Dougherty809b0842013-10-31 14:01:56 -0700157 <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 -0700158 <h4>Linking Google Analytics with Google Play</h4>
159 <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 -0700160 </a></li>
Dirk Dougherty76cdbdc2012-10-22 21:30:29 -0700161 </ul>
Scott Main50e990c2012-06-21 17:14:39 -0700162 <!-- FEATURED DOCS -->
Dirk Dougherty76cdbdc2012-10-22 21:30:29 -0700163 <ul>
164 <li><a href="{@docRoot}distribute/googleplay/spotlight/tablets.html">
165 <h4>Tablet Stories</h4>
166 <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>
167 </a></li>
168 <li><a href="{@docRoot}distribute/googleplay/quality/core.html">
169 <h4>Core App Quality Guidelines</h4>
170 <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>
171 </a></li>
172 <li><a href="{@docRoot}guide/topics/ui/notifiers/notifications.html">
173 <h4>Updated Notifications API Guide</h4>
174 <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>
175 </a></li>
176 <li><a href="{@docRoot}guide/topics/ui/dialogs.html">
177 <h4>Updated Dialogs API Guide</h4>
178 <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>
179 </a></li>
180 </ul>
Scott Main50e990c2012-06-21 17:14:39 -0700181 </div>
182 </div>
183 </div> <!-- /news and feature feed -->
184 <!-- video feed -->
185 <div class="feed col-8" style="margin-right:0">
186 <ul class="feed-nav">
187 <li class="active">DEVELOPERS LIVE</li>
188 <li>VIDEO PLAYLISTS</li>
189 </ul>
190 <div class="feed-container">
191 <div class="feed-frame">
Dirk Dougherty76cdbdc2012-10-22 21:30:29 -0700192 <ul id="DevelopersLive">
193 </ul>
194 <ul id="VideoPlaylists">
195 </ul>
Scott Main50e990c2012-06-21 17:14:39 -0700196 </div>
197 </div>
198 </div>
199 <!-- /video feed -->
200</div>
201
202<br class="clearfix"/>
Scott Main50e990c2012-06-21 17:14:39 -0700203
204
205
206
207
208
209
210
211
212
213<script src="//swfobject.googlecode.com/svn/trunk/swfobject/swfobject.js" type="text/javascript"></script>
214<script type="text/javascript">
215
216/* Load a video into the player box.
217 * @param id The YouTube video ID
218 * @param title The video title to display in the player box (character escaped)
219 * @param autoplay Whether to automatically play the video
220 */
221function loadVideo(id, title, autoplay) {
222 swfobject.embedSWF('//www.youtube.com/v/' + id + '&rel=1&border=0&fs=1&autoplay=' +
223 (autoplay?1:0), 'player', '525', '330', '9.0.0', false, false, {allowfullscreen: 'true'});
224 $("#videoPlayerTitle").html("<h2>" + unescape(title) + "</h2>");
225 $("#player-wrapper").show();
226 setTimeout(function(){$('#noplayer-message').show()}, 2000);
227}
228
229/* Draw all videos from a playlist into a 'videoPreviews' list
230 * @param data The feed data returned from the youtube request
231 */
232function renderVideoPlaylists(data) {
233 var MAX_LIST_DESC_LENGTH = 130; // the length at which we will trim the description
234 var MAX_VIDEO_DESC_LENGTH = 100; // the length at which we will trim the description
235 var MAX_LIST_LENGTH = 4; // number of videos to put in the list
236 var feed = data.feed;
237 var entries = feed.entry || [];
238 var playlistId = feed.yt$playlistId.$t;
239
240 var $ulVideos = $('<ul style="display:none"/>');
241 var summary = feed.media$group.media$description != null ? feed.media$group.media$description.$t : feed.subtitle.$t;
242
243 var $liPlaylist = $('<li class="playlist"></li>');
244 var $aPlaylist = $('<a href="" onclick="togglePlaylist(this);return false;"></a>');
245 $liPlaylist.append($aPlaylist);
246 $aPlaylist.append('<h4>' + feed.title.$t + '</h4>');
247
248 var playlistDescription = summary.substr(0, MAX_LIST_DESC_LENGTH);
249 playlistDescription += playlistDescription.length == MAX_LIST_DESC_LENGTH ? "..." : ""; // add ellipsis if we've chopped the description
250 $aPlaylist.append('<p>' + playlistDescription + '</p>');
251
252 // Loop through each entry (each video) and add it to the 'videoPreviews' list
253 var length = feed.entry.length < MAX_LIST_LENGTH ? feed.entry.length : MAX_LIST_LENGTH; // max of 4 videos per list
254 for (var i = 0; i < length; i++) {
255 var entry = entries[i];
256
257 var title = entry.title.$t;
258 var id = entry.media$group.yt$videoid.$t;
259 var thumbUrl = entry.media$group.media$thumbnail[0].url;
260 var fullDescription = entry.media$group.media$description.$t;
261 var playerUrl = entry.media$group.media$content[0].url;
262
263 var shortDescription = fullDescription.substr(0, MAX_VIDEO_DESC_LENGTH);
264 shortDescription += shortDescription.length == MAX_VIDEO_DESC_LENGTH ? "..." : ""; // add ellipsis if we've chopped the description
265
266 var img = $('<img src="' + thumbUrl + '" width="60" height="45"/>');
267 var a = $('<a href="#" onclick="loadVideo(\'' + id + '\',\'' + escape(title) + '\',true); return false;" />');
268 var pShortDescription = $('<p>' + shortDescription + '</p>');
269 var h5Title = "<h5>" + title + "</h5>";
270 var li = $('<li class="playlist-video"/>');
271
272 li.append(a);
273 a.append(img).append(h5Title).append(pShortDescription);
274
275 $ulVideos.append(li);
276
277 // use the first entry's thumbnail for the playlist
278 if (i == 0) {
279 $aPlaylist.prepend('<img src="' + thumbUrl + '" width="120" height="90"/>');
280 }
281 }
282
283 if (feed.entry.length > MAX_LIST_LENGTH) {
284 // add item to go to youtube for playlist
Scott Main99947692013-05-20 11:54:36 -0700285 $ulVideos.append('<li class="more"><a href="//www.youtube.com/playlist?list=' + playlistId + '">More &raquo;</a></li>');
Scott Main50e990c2012-06-21 17:14:39 -0700286 }
287
288 $liPlaylist.append($ulVideos);
289 $('#VideoPlaylists').append($liPlaylist);
290}
291
292
293function renderDevelopersLivePlaylist(data) {
294
295 var MAX_DESC_LENGTH = 125; // the length at which we will trim the description
296 var feed = data.feed;
297 var entries = feed.entry || [];
298 var playlistId = feed.yt$playlistId.$t;
299
300 var ul = $('#DevelopersLive');
301
302 // Loop through each entry (each video) and add it to the '#DevelopersLive' list
303 for (var i = 0; i < 4; i++) {
304 var entry = entries[i];
305
306 var title = entry.title.$t;
307 var id = entry.media$group.yt$videoid.$t;
308 var thumbUrl = entry.media$group.media$thumbnail[0].url;
309 var fullDescription = entry.media$group.media$description.$t;
310 var playerUrl = entry.media$group.media$content[0].url;
311 var shortDescription = fullDescription.substr(0, MAX_DESC_LENGTH);
312 shortDescription += shortDescription.length == MAX_DESC_LENGTH ? "..." : ""; // add ellipsis if we've chopped the description
313
314 var img = $('<img src="' + thumbUrl + '" width="120" height="90"/>');
315 var a = $('<a href="#" onclick="loadVideo(\'' + id + '\',\'' + escape(title) + '\',true); return false;" />');
316 var pShortDescription = $('<p>' + shortDescription + '</p>');
317 var h4Title = "<h4>" + title + "</h4>";
318 var li = $('<li/>');
319
320 li.append(a);
321 a.append(img).append(h4Title).append(pShortDescription);
322
323 ul.append(li);
324 }
325}
326
Scott Main50e990c2012-06-21 17:14:39 -0700327/* This 'playlist' object defines the playlist IDs for each tab.
328 * Each name inside 'playlist' corresponds to class names for the tab that the playlists belong to (eg: "googleioTab" and "googleioBox" divs).
329 * Each string in 'ids' is the ID of a YouTube playlist that belongs in the corresponding tab.
330 */
331var playlists = {
Scott Mainbce26802012-11-15 10:26:40 -0800332 'designinaction' : {
333 'ids': ["PLWz5rJ2EKKc8j2B95zGMb8muZvrIy-wcF"]
Scott Main50e990c2012-06-21 17:14:39 -0700334 },
Scott Main99947692013-05-20 11:54:36 -0700335 'bizdevbytes' : {
336 'ids': ["PLWz5rJ2EKKc8-Osr0TuHyTMEhKV0xJ6ql"]
Scott Mainbce26802012-11-15 10:26:40 -0800337 },
Scott Main41b08da2013-06-17 17:47:36 -0700338 'thisweek' : {
339 'ids': ["PLWz5rJ2EKKc9Wam5jE-9oY8l6RpeAx-XM"]
Scott Mainbce26802012-11-15 10:26:40 -0800340 },
341 'googleio' : {
Scott Main99947692013-05-20 11:54:36 -0700342 'ids': ["PLWz5rJ2EKKc9WGUwq2gQ-coU3fSyexgOx"]
Scott Main50e990c2012-06-21 17:14:39 -0700343 }
344};
345
346/* Request the playlist feeds from YouTube */
347function showVideosPlaylists() {
348 for (var x in playlists) {
349 var ids = playlists[x].ids;
350 for (var i in ids) {
351 var script = "<script type='text/javascript' src='//gdata.youtube.com/feeds/api/playlists/"
352 + ids[i] +
Scott Main99947692013-05-20 11:54:36 -0700353 "?v=2&alt=json-in-script&max-results=50&callback=renderVideoPlaylists&orderby=position'><\/script>";
Scott Main50e990c2012-06-21 17:14:39 -0700354 $("body").append(script);
355 }
356 }
357}
358
359
360/* Request the playlist feeds from YouTube */
361function showDevelopersLivePlaylist() {
Scott Main5b61ad22013-01-15 11:18:48 -0800362 var playlistId = "PLWz5rJ2EKKc_XOgcRukSoKKjewFJZrKV0"; /* DevBytes */
Scott Main50e990c2012-06-21 17:14:39 -0700363 var script = "<script type='text/javascript' src='//gdata.youtube.com/feeds/api/playlists/"
364 + playlistId +
Scott Main99947692013-05-20 11:54:36 -0700365 "?v=2&alt=json-in-script&max-results=10&callback=renderDevelopersLivePlaylist&orderby=position'><\/script > ";
Scott Main50e990c2012-06-21 17:14:39 -0700366 $("body").append(script);
367}
368
369
370function togglePlaylist(listLink) {
371 var $list = $(listLink).parent();
372 var $ul = $list.find('ul');
373 if ($ul.is(":visible")) {
374 $ul.slideUp(function() {
375 $list.css({'height':'inherit'});
376 });
377 } else {
378 $list.closest('ul').find('li.playlist').find('ul').slideUp();
379 $ul.slideDown();
380 $list.css({'height':'auto'});
381 }
382}
383
384showDevelopersLivePlaylist();
385showVideosPlaylists();
Dirk Dougherty49be1ef2012-11-29 21:11:24 -0800386</script>