1page.title=Dashboards 2@jd:body 3 4<style> 5div.chart, 6div.screens-chart { 7 display:none; 8} 9tr .total { 10 background-color:transparent; 11 border:0; 12 color:#666; 13} 14tr th.total { 15 font-weight:bold; 16} 17</style> 18 19 20 21 22<div class="sidebox"> 23<h2>Google Play Install Stats</h2> 24<p>The Google Play Developer Console also provides <a 25href="{@docRoot}distribute/googleplay/about/distribution.html#stats">detailed statistics</a> 26about your users' devices. Those stats may help you prioritize the device profiles for which 27you optimize your app.</p> 28</div> 29 30<p>This page provides information about the relative number of devices that share a certain 31characteristic, such as Android version or screen size. This information may 32help you prioritize efforts for <a 33href="{@docRoot}training/basics/supporting-devices/index.html">supporting different devices</a>.</p> 34 35<p>Each snapshot of data represents all the devices that visited the Google Play Store in the 36prior 14 days.</p> 37 38<p class="note"><strong>Note:</strong> Beginning in April, 2013, these charts are now built 39using data collected from each device when the user visits the Google Play Store. Previously, the 40data was collected when the device simply checked-in to Google servers. We believe the new 41data more accurately reflects those users who are most engaged in the Android and Google Play 42ecosystem.</p> 43 44 45<h2 id="Platform">Platform Versions</h2> 46 47<p>This section provides data about the relative number of devices running a given version of 48the Android platform.</p> 49 50<p>For information about how to target your application to devices based on 51platform version, read <a 52href="{@docRoot}training/basics/supporting-devices/platforms.html">Supporting Different 53Platform Versions</a>.</p> 54 55 56<div id="version-chart"> 57</div> 58 59 60<p style="clear:both"><em>Data collected during a 14-day period ending on May 1, 2013. 61<br/>Any versions with less than 0.1% distribution are not shown.</em> 62</p> 63 64 65 66 67 68 69<h2 id="Screens">Screen Sizes and Densities</h2> 70 71 72<p>This section provides data about the relative number of devices that have a particular 73screen configuration, defined by a combination of screen size and density. To simplify the way that 74you design your user interfaces for different screen configurations, Android divides the range of 75actual screen sizes and densities into several buckets as expressed by the table below.</p> 76 77<p>For information about how you can support multiple screen configurations in your 78application, read <a href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple 79Screens</a>.</p> 80 81 82<div id="screens-chart"> 83</div> 84 85 86<p style="clear:both"><em>Data collected during a 14-day period ending on May 1, 2013 87<br/>Any screen configurations with less than 0.1% distribution are not shown.</em></p> 88 89 90 91 92 93 94 95 96<h2 id="OpenGL">Open GL Version</h2> 97 98<p>This section provides data about the relative number of devices that support a particular 99version of OpenGL ES. Note that support for one particular version of OpenGL ES also implies 100support for any lower version (for example, support for version 2.0 also implies support for 1011.1).</p> 102 103 104<img alt="" style="float:right" 105src="//chart.googleapis.com/chart?cht=p&chs=400x250&chco=c4df9b,6fad0c&chl=GL%201.1%20only|GL%202.0%20%26%201.1&chd=t%3A0.2,99.8&chf=bg,s,00000000" /> 106 107<p>To declare which version of OpenGL ES your application requires, you should use the {@code 108android:glEsVersion} attribute of the <a 109href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> 110element. You can also use the <a 111href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html">{@code 112<supports-gl-texture>}</a> element to declare the GL compression formats that your application 113uses.</p> 114 115 116<table style="width:350px"> 117<tr> 118<th scope="col">OpenGL ES Version</th> 119<th scope="col">Distribution</th> 120</tr> 121<tr> 122<td>1.1 only</th> 123<td>0.2%</td> 124</tr> 125<tr> 126<td>2.0 & 1.1</th> 127<td>99.8%</td> 128</tr> 129</table> 130 131 132 133<p style="clear:both"><em>Data collected during a 14-day period ending on May 1, 2013</em></p> 134 135 136 137 138 139 140 141 142 143 144 145 146 147<script> 148var VERSION_DATA = 149[ 150 { 151 "chart": "//chart.googleapis.com/chart?chs=500x250&cht=p&chf=bg%2Cs%2C00000000&chd=t%3A1.8%2C3.7%2C38.5%2C0.1%2C27.5%2C28.4&chco=c4df9b%2C6fad0c&chl=Eclair%7CFroyo%7CGingerbread%7CHoneycomb%7CIce%20Cream%20Sandwich%7CJelly%20Bean", 152 "data": [ 153 { 154 "api": 4, 155 "name": "Donut", 156 "perc": "0.1" 157 }, 158 { 159 "api": 7, 160 "name": "Eclair", 161 "perc": "1.7" 162 }, 163 { 164 "api": 8, 165 "name": "Froyo", 166 "perc": "3.7" 167 }, 168 { 169 "api": 9, 170 "name": "Gingerbread", 171 "perc": "0.1" 172 }, 173 { 174 "api": 10, 175 "name": "Gingerbread", 176 "perc": "38.4" 177 }, 178 { 179 "api": 13, 180 "name": "Honeycomb", 181 "perc": "0.1" 182 }, 183 { 184 "api": 15, 185 "name": "Ice Cream Sandwich", 186 "perc": "27.5" 187 }, 188 { 189 "api": 16, 190 "name": "Jelly Bean", 191 "perc": "26.1" 192 }, 193 { 194 "api": 17, 195 "name": "Jelly Bean", 196 "perc": "2.3" 197 } 198 ] 199 } 200]; 201 202 203 204 205 206var SCREEN_DATA = 207[ 208 209 { 210 "data": { 211 "Large": { 212 "hdpi": "0.4", 213 "ldpi": "0.6", 214 "mdpi": "2.9", 215 "tvdpi": "1.0", 216 "xhdpi": "0.7" 217 }, 218 "Normal": { 219 "hdpi": "37.3", 220 "ldpi": "0.1", 221 "mdpi": "16.1", 222 "xhdpi": "24.9", 223 "xxhdpi": "1.3" 224 }, 225 "Small": { 226 "ldpi": "9.8" 227 }, 228 "Xlarge": { 229 "hdpi": "0.1", 230 "ldpi": "0.2", 231 "mdpi": "4.5", 232 "xhdpi": "0.1" 233 } 234 }, 235 "densitychart": "//chart.googleapis.com/chart?chs=400x250&cht=p&chf=bg%2Cs%2C00000000&chd=t%3A10.7%2C23.5%2C1.0%2C37.8%2C25.7%2C1.3&chco=c4df9b%2C6fad0c&chl=ldpi%7Cmdpi%7Ctvdpi%7Chdpi%7Cxhdpi%7Cxxhdpi", 236 "layoutchart": "//chart.googleapis.com/chart?chs=400x250&cht=p&chf=bg%2Cs%2C00000000&chd=t%3A4.9%2C5.6%2C79.7%2C9.8&chco=c4df9b%2C6fad0c&chl=Xlarge%7CLarge%7CNormal%7CSmall" 237 } 238]; 239 240 241 242var VERSION_NAMES = 243[ 244 {"api":0},{"api":1},{"api":2},{"api":3}, 245 { 246 "api":4, 247 "link":"<a href='/about/versions/android-1.6.html'>1.6</a>", 248 "codename":"Donut", 249 }, 250 { "api":5}, 251 { "api":6}, 252 { 253 "api":7, 254 "link":"<a href='/about/versions/android-2.1.html'>2.1</a>", 255 "codename":"Eclair", 256 }, 257 { 258 "api":8, 259 "link":"<a href='/about/versions/android-2.2.html'>2.2</a>", 260 "codename":"Froyo" 261 }, 262 { 263 "api":9, 264 "link":"<a href='/about/versions/android-2.3.html'>2.3 -<br>2.3.2</a>", 265 "codename":"Gingerbread" 266 }, 267 { 268 "api":10, 269 "link":"<a href='/about/versions/android-2.3.3.html'>2.3.3 -<br>2.3.7</a>", 270 "codename":"Gingerbread" 271 }, 272 { "api":11}, 273 { 274 "api":12, 275 "link":"<a href='/about/versions/android-3.1.html'>3.1</a>", 276 "codename":"Honeycomb" 277 }, 278 { 279 "api":13, 280 "link":"<a href='/about/versions/android-3.2.html'>3.2</a>", 281 "codename":"Honeycomb" 282 }, 283 { "api":14}, 284 { 285 "api":15, 286 "link":"<a href='/about/versions/android-4.0.html'>4.0.3 -<br>4.0.4</a>", 287 "codename":"Ice Cream Sandwich" 288 }, 289 { 290 "api":16, 291 "link":"<a href='/about/versions/android-4.1.html'>4.1.x</a>", 292 "codename":"Jelly Bean" 293 }, 294 { 295 "api":17, 296 "link":"<a href='/about/versions/android-4.2.html'>4.2.x</a>", 297 "codename":"Jelly Bean" 298 } 299]; 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319$(document).ready(function(){ 320 // for each set of data (each month) 321 $.each(VERSION_DATA, function(i, set) { 322 323 // set up wrapper divs 324 var $div = $('<div class="chart"' 325 + ((i == 0) ? ' style="display:block"' : '') 326 + ' >'); 327 var $divtable = $('<div class="col-5" style="margin-left:0">'); 328 var $divchart = $('<div class="col-8" style="margin-right:0">'); 329 330 // set up a new table 331 var $table = $("<table>"); 332 var $trh = $("<tr><th>Version</th>" 333 + "<th>Codename</th>" 334 + "<th>API</th>" 335 + "<th>Distribution</th></tr>"); 336 $table.append($trh); 337 338 // loop each data set (each api level represented in stats) 339 $.each(set.data, function(i, data) { 340 // check if we need to rowspan the codename 341 var rowspan = 1; 342 // must not be first row 343 if (i > 0) { 344 // if this row's codename is the same as previous row codename 345 if (data.name == set.data[i-1].name) { 346 rowspan = 0; 347 // otherwise, as long as this is not the last row 348 } else if (i < (set.data.length - 1)) { 349 // increment rowspan for each subsequent row w/ same codename 350 while (data.name == set.data[i+rowspan].name) { 351 rowspan++; 352 // unless we've reached the last row 353 if ((i + rowspan) >= set.data.length) break; 354 } 355 } 356 } 357 358 // create table row and get corresponding version info from VERSION_NAMES 359 var $tr = $("<tr>"); 360 $tr.append("<td>" + VERSION_NAMES[data.api].link + "</td>"); 361 if (rowspan > 0) { 362 $tr.append("<td rowspan='" + rowspan + "'>" + VERSION_NAMES[data.api].codename + "</td>"); 363 } 364 $tr.append("<td>" + data.api + "</td>"); 365 $tr.append("<td>" + data.perc + "%</td>"); 366 $table.append($tr); 367 }); 368 369 // create chart image 370 var $chart = $('<img style="margin-left:30px" alt="" src="' + set.chart + '" />'); 371 372 // stack up and insert the elements 373 $divtable.append($table); 374 $divchart.append($chart); 375 $div.append($divtable).append($divchart); 376 $("#version-chart").append($div); 377 }); 378 379 380 381 var SCREEN_SIZES = ["Small","Normal","Large","Xlarge"]; 382 var SCREEN_DENSITIES = ["ldpi","mdpi","tvdpi","hdpi","xhdpi","xxhdpi"]; 383 384 385 // for each set of screens data (each month) 386 $.each(SCREEN_DATA, function(i, set) { 387 388 // set up wrapper divs 389 var $div = $('<div class="screens-chart"' 390 + ((i == 0) ? ' style="display:block"' : '') 391 + ' >'); 392 393 // set up a new table 394 var $table = $("<table>"); 395 var $trh = $("<tr><th></th></tr>"); 396 $.each(SCREEN_DENSITIES, function(i, density) { 397 $trh.append("<th scope='col'>" + density + "</th>"); 398 }); 399 $trh.append("<th scope='col' class='total'>Total</th>"); 400 $table.append($trh); 401 402 // array to hold totals for each density 403 var densityTotals = new Array(SCREEN_DENSITIES.length); 404 $.each(densityTotals, function(i, total) { 405 densityTotals[i] = 0; // make them all zero to start 406 }); 407 408 // loop through each screen size 409 $.each(SCREEN_SIZES, function(i, size) { 410 // if there are any devices of this size 411 if (typeof set.data[size] != "undefined") { 412 // create table row and insert data 413 var $tr = $("<tr>"); 414 $tr.append("<th scope='row'>" + size + "</th>"); 415 // variable to sum all densities for this size 416 var total = 0; 417 // loop through each density 418 $.each(SCREEN_DENSITIES, function(i, density) { 419 var num = typeof set.data[size][density] != "undefined" ? set.data[size][density] : 0; 420 $tr.append("<td>" + (num != 0 ? num + "%" : "") + "</td>"); 421 total += parseFloat(num); 422 densityTotals[i] += parseFloat(num); 423 }) 424 $tr.append("<td class='total'>" + total.toFixed(1) + "%</td>"); 425 $table.append($tr); 426 } 427 }); 428 429 // create row of totals for each density 430 var $tr = $("<tr><th class='total'>Total</th></tr>"); 431 $.each(densityTotals, function(i, total) { 432 $tr.append("<td class='total'>" + total.toFixed(1) + "%</td>"); 433 }); 434 $table.append($tr); 435 436 // create charts 437 var $sizechart = $('<img style="float:left;width:380px" alt="" src="' 438 + set.layoutchart + '" />'); 439 var $densitychart = $('<img style="float:left;width:380px" alt="" src="' 440 + set.densitychart + '" />'); 441 442 // stack up and insert the elements 443 $div.append($table).append($sizechart).append($densitychart); 444 $("#screens-chart").append($div); 445 }); 446 447 448}); 449 450 451 452function changeVersionDate() { 453 var date = $('#date-versions option:selected').val(); 454 455 $(".chart").hide(); 456 $(".chart."+date+"").show(); 457} 458 459 460function changeScreensVersionDate() { 461 var date = $('#date-screens option:selected').val(); 462 463 $(".screens-chart").hide(); 464 $(".screens-chart."+date+"").show(); 465} 466 467</script> 468