Saturday, March 10, 2012

[Gd] Fridaygram: Colossus revealed, risk-taking bees, super attire

| More

Google Developers Blog: Fridaygram: Colossus revealed, risk-taking bees, super attire

Author Photo
By Scott Knaster, Google Developers Blog Editor

The world’s first programmable computer was Colossus, built in England in 1943. During World War II, Colossus was used to break codes at the UK’s famed decryption center at Bletchley Park. With a little help from its friends, Bletchley Park was recently saved from destruction, and many of its historic sites are now being restored. This week, a gallery dedicated to Colossus opened at the National Museum of Computing, housed at Bletchley Park.

rebuilt Colossus
Colossus rebuilt. You can see it at The National Museum of Computing in the UK.
Reproduced with kind permission of The National Museum of Computing.

Even many years after the war, Colossus was kept secret. Another big secret, just discovered, is about honeybees: they’re not all alike. Researchers have found that some worker bees seem to be more interested than others in novel behaviors such as finding a new home for the hive. (Let’s call these the startup bees.) Scientists studied the genetic foundation for varying behaviors, and using chemical treatments, they were able to change whether bees were likely to display this “novelty-seeking” behavior.

Speaking of novelty, if you happen to be in Knoxville, Tennessee any time in March, you can check out some knitted superhero costumes on display at the University of Tennessee at Knoxville's Ewing Gallery. They’re perfect for wearing to your favorite upcoming superhero movie.


Ludicrous transitions are just part of the fun here at Fridaygram, where we take a break from the real news once a week. Each Fridaygram item must pass only one test: it has to be interesting to us nerds. By the way, the main topic of today’s post has no connection to this amazing movie, which features a great performance by Paul Frees (uncredited, of course).
URL: http://googledevelopers.blogspot.com/2012/03/fridaygram-colossus-revealed-risk.html

[Gd] Google Prediction API 1.5 adds enumeration, analysis, and more

| More

Google Developers Blog: Google Prediction API 1.5 adds enumeration, analysis, and more

Author Photo
By Marc Cohen, Developer Relations

The Google Prediction API Team has been hard at work on Release 1.5, which is available now, with the following new features:
  • Model enumeration. We’ve added the ability to list all of your models via the trainedmodels.list request. You can obtain the entire list in one response or you can iterate through a large listing in pieces using the maxResults and pageToken options.

  • Model analysis. We’ve added the ability to obtain more detailed information about data and models via the trainedmodels.analyze request, which returns information about the trained model’s output values, features, confusion matrix, and other information.

  • Simplified get method. We’ve simplified the output returned by the trainedmodels.get request. Model analysis data that previously was returned by a get request (e.g. the confusion matrix), is now returned by the new analyze request, along with additional analysis data. The get response now returns a simpler model description along with new timestamps indicating when the model was inserted and when model training completed, which should make it easier to keep track of model lifecycle.

  • New Google App Engine samples. We’ve created two new sample apps illustrating how to use the Prediction API from App Engine, coded in Python and Java. These samples show how to create and manage shared server OAuth 2.0 credentials, and how to make predictions on behalf of any site visitors using the shared server credentials. The sample code is available here and a live version of the sample app is available here: http://try-prediction.appspot.com.
You can read more about the API details here. The new release is available now via the HTTP RESTful interface and our various language-specific client libraries. You can also experiment with the new Prediction API 1.5 interactively via the Google APIs Explorer.

We’re always looking for ways to improve the Prediction API so, as always, please let us know about any problems or feature suggestions you might have. Happy Predicting!


Marc Cohen is a member of Google’s Developer Relations Team in Seattle. When not teaching Python programming and listening to indie rock music, he enjoys using the Google Prediction API to peer into the future.

Posted by Scott Knaster, Editor
URL: http://googledevelopers.blogspot.com/2012/03/google-prediction-api-15-adds.html

[Gd] Chrome Stable Update

| More

Chrome Releases: Chrome Stable Update

The Chrome Stable channel has been updated to 17.0.963.79 on Windows, Mac, Linux and Chrome Frame.  This release fixes issues with Flash games, along with the security fix listed below.

Security fixes and rewards:

Congratulations to PinkiePie (aka PwniePie) for a beautiful piece of work to close out the Pwnium competition!

We’re delighted at the success of Pwnium and the ability to study full exploits. We anticipate landing additional changes and hardening measures for both CVE-2011-3046 and CVE-2011-3047 in the near future. We also believe that both submissions are works of art and deserve wider sharing and recognition. We plan to do technical reports on both Pwnium submissions in the future.

  • [Like a b-b-b-b-boss!!! $60,000] [117620] [117656] Critical CVE-2011-3047: Errant plug-in load and GPU process memory corruption. Credit to PinkiePie.

Please see the Chromium security page for more detail. Note that the referenced bugs may be kept private until a majority of our users are up to date with the fix.

Full details about what changes are in this release are available in the SVN revision log. Interested in hopping on the stable channel? Find out how.  If you find a new issue, please let us know by filing a bug.

Jason Kersey
Google Chrome
URL: http://googlechromereleases.blogspot.com/2012/03/chrome-stable-update_10.html

[Gd] Stable Channel Update for Chromebooks

| More

Chrome Releases: Stable Channel Update for Chromebooks

The Stable channel has been updated to 17.0.963.78 (Platform version: 1412.230.0/1412.231.0-Samsung) for Chromebooks (Acer AC700, Samsung Series 5, and Cr-48). This release includes latest security fixes listed in Chrome 17.0.963.78 blogpost.

If you find new issues, please let us know by visiting our help site or filing a bug. Interested in switching to the Beta channel? Find out how. You can submit feedback using ‘Report an issue’ under the wrench menu.

Josafat Garcia
Google Chrome
URL: http://googlechromereleases.blogspot.com/2012/03/chrome-os-stable-channel-update.html

Friday, March 9, 2012

[Gd] Introducing Page Speed mobile analysis, on Google Chrome for Android

| More

Google Developers Blog: Introducing Page Speed mobile analysis, on Google Chrome for Android

Matthew
Libo

By Libo Song and Matthew Hillyard, Software Engineers

Nearly a year ago, we launched Page Speed for Chrome, which has enabled Chrome users to get Page Speed performance suggestions to make their desktop sites faster. Today, we are releasing an update to Page Speed for Chrome that supports mobile Page Speed analysis via Chrome for Android. With Page Speed for Chrome and Chrome for Android, you can perform Page Speed analysis on the mobile version of your web pages, as they are loaded in the Chrome for Android mobile browser.

Many web sites serve mobile-specific versions of their pages. Often, the mobile pages have very different Page Speed scores and Page Speed reports from their desktop counterparts. Page Speed on Chrome for Android makes it easy to analyze both the desktop and mobile versions of your web pages, so you can be sure that your pages load faster for the users of both your desktop and mobile sites.

When analyzing the mobile version of pages, Page Speed for Chrome tunes its analysis to reflect the unique performance characteristics of mobile devices and networks, suggesting the optimizations that will have the biggest impact on reducing load times for your mobile users. Using the powerful Chrome Developer Tools Extension APIs, Page Speed for Chrome can identify renderer performance optimizations that are especially relevant on mobile, such as removing unnecessary reflows and finding long-running scripts that slow down your pages. Page Speed for Chrome will also automatically minify and optimize your HTML, JavaScript, CSS, and image files and make them available for you to download, so you can easily deploy them on your web server.

To get started using Page Speed on Chrome for Android:
  • Follow the instructions to install the Page Speed for Chrome extension on your desktop Chrome browser.
  • Enable remote debugging in Chrome running on your Android device.
  • Navigate to the remote Chrome Developer Tools page in your desktop browser (localhost:9222) .
  • Select one of the Chrome tabs running on your Android device.
In addition to the full Chrome Developer Tools, you will see Page Speed in the Developer Tools panel. Click the Page Speed icon to switch to the Page Speed tab, then click Run Page Speed to generate mobile Page Speed suggestions for the web page that’s loaded on your Android device.


Page Speed screen shot

We hope you’ll give Page Speed for Chrome on Android a try. Please send us feedback via our discussion list and let us know what features you’d like to see us to add next. You may also be interested in watching our recent Google I/O talk on Page Speed performance best practices for mobile web sites.


Libo Song is a software engineer at Google Boston working on the Page Speed team to make the web faster.

Matthew Hillyard worked on the Page Speed team as an intern. He has since graduated with a Master’s degree in computer science from Johns Hopkins University and currently is a software engineer on the Google+ team.

Posted by Scott Knaster, Editor
URL: http://googledevelopers.blogspot.com/2012/03/introducing-page-speed-mobile-analysis.html

[Gd] Beta Channel Update

| More

Chrome Releases: Beta Channel Update


The Beta channel has been updated to 18.0.1025.54 for Windows, Mac, Linux and Chrome Frame platforms 

All
  • Fixed Chrome install/update resets Google search preferences (Issue: 105390)
  • Don't trigger accelerated compositing on 3D CSS when using swiftshader (Issue: 116401)
  • Fixed a GPU crash (Issue: 116096)
  • More fixes for Back button frequently hangs (Issue: 93427)
  • Bastion now works (Issue: 116285)
  • Fixed Composited layer sorting irregularity with accelerated canvas (Issue: 102943)
  • Fixed Composited layer sorting irregularity with accelerated canvas (Issue: 102943)
  • Fixed Google Feedback causes render process to use too much memory (Issue: 114489)
  • Fixed after upgrade, some pages are rendered as blank (Issue: 109888)
  • Fixed Pasting text into a single-line text field shouldn't keep literal newlines (Issue: 106551)
More details about additional changes are available in the svn log of all revisions. If you find a new issue, please let us know by filing a bug.

Karen Grunberg
Google Chrome


URL: http://googlechromereleases.blogspot.com/2012/03/beta-channel-update.html

[Gd] Dev and Beta Channels Update for CR-48

| More

Chrome Releases: Dev and Beta Channels Update for CR-48

The Dev and Beta channels have been updated to 18.0.1025.52 (Platform versions: 1660.71.0) for Cr-48.

This build contains a number of fixes and stability improvements. Some highlights of these changes are:
  • New Pepper flash release
  • Crash fixes
If you find new issues, please let us know by visiting our help site or filing a bug. Interested in switching channels? Find out how. You can submit feedback using ‘Report an issue’ under the wrench menu.

Josafat Garcia
Google Chrome
URL: http://googlechromereleases.blogspot.com/2012/03/beta-channel-update-for-cr-48.html

[Gd] Chrome Stable Channel Update

| More

Chrome Releases: Chrome Stable Channel Update

The Chrome Stable channel has been updated to 17.0.963.78 on Windows, Mac, Linux and Chrome Frame.  This release fixes issues with Flash games and videos, along with the security fix listed below.

Security fixes and rewards:

Congratulations again to community member Sergey Glazunov for the first submission to Pwnium!

  • [Ch-ch-ch-ch-ching!!! $60,000] [117226] [117230] Critical CVE-2011-3046: UXSS and bad history navigation. Credit to Sergey Glazunov.

Please see the Chromium security page for more detail. Note that the referenced bugs may be kept private until a majority of our users are up to date with the fix.

Full details about what changes are in this release are available in the SVN revision log. Interested in hopping on the stable channel? Find out how.  If you find a new issue, please let us know by filing a bug.

Jason Kersey
Google Chrome
URL: http://googlechromereleases.blogspot.com/2012/03/chrome-stable-channel-update.html

Thursday, March 8, 2012

[Gd] Sheetcaster: 3D in Apps Script

| More

Google Apps Developer Blog: Sheetcaster: 3D in Apps Script

Editor’s note: This is a guest post by Thomas Coudray, Amaury de la Vieuville, and Ahmed Bougacha. Thomas, Amaury, and Ahmed attended the Google Apps Script Hackathon in Paris, and in this post they are sharing their creative use of Google Apps Script to render a 3D scene in a Google Spreadsheet. -- Jan Kleinert

Recently, we heard about the Google Apps Script Hackathon arriving in Paris, France. We did not know much about Apps Script - heck, even JavaScript! Perfect occasion to learn something. We spent most of the event hacking around with the ever-growing collection of Google APIs. As a tribute to the folks over at id Software, we settled on one of the most fun (however useless) ways to use it: rendering a 3D scene in a spreadsheet.

The rendering is done using a technique called ray-casting, made popular by the 90s id Software game Wolfenstein 3D. Ray-casting is a really brilliant and straightforward algorithm:

First, we render the background: color the upper (sky) and lower (floor) halves of the screen in different colors. We store the pixel colors in a matrix, the screen buffer:


screen = new Array(SIZE_Y);
for (var lin = 0; lin < SIZE_Y; lin++) {
screen[lin] = new Array(SIZE_X);
for (var col = 0; col < SIZE_X; col++) {
screen[lin][col] = colorToString((lin < MID) ? UPPER_BG_COLOR
: LOWER_BG_COLOR);
}
}

Note that we draw the screen only once the buffer is fully colored, to avoid the overhead of coloring cells individually.

Then for each column of the screen:

  1. Cast a ray
  2. Move along the ray until hitting a wall, calculate the distance to that wall
  3. Draw a column whose height is inversely proportional to that distance

The trick is in the drawing: the upper and lower halves of the screen are symmetrical in shape, and the only computed value is the display height of the wall. The screen really is just a fancy formatting for an integer array of columns.

The camera is represented using:

  • Its (real-valued) x/y coordinates in the map plane
  • Its angle relative to some predefined direction

We store these 3 values at the bottom of the sheet, to ensure persistence (else, each refresh would bring us back to the start location!).


function Camera() {
this.x = CAMERA_X;
this.y = CAMERA_Y;
this.theta = CAMERA_THETA;

this.saveToSheet = function(sheet) {
// The player state has to be saved between each frame
sheet.getRange(STORE_LIN, 1, 1, 1).setValue(this.x);
sheet.getRange(STORE_LIN, 2, 1, 1).setValue(this.y);
sheet.getRange(STORE_LIN, 3, 1, 1).setValue(this.theta);
};

this.readFromSheet = function(sheet) {
this.x = sheet.getRange(STORE_LIN, 1, 1, 1).getValue();
this.y = sheet.getRange(STORE_LIN, 2, 1, 1).getValue();
this.theta = sheet.getRange(STORE_LIN, 3, 1, 1).getValue();
};

...
}

The map is a logical matrix, thus limiting us to discrete boxes for walls: for every cell, there either is (1), or is not (0), a wall:


// starting 10x10 map
var S = 10;
var map =
[
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 0, 1, 0, 0, 0, 0, 0, 0, 1],
[1, 0, 1, 0, 1, 0, 1, 1, 0, 1],
[1, 0, 0, 0, 0, 0, 0, 0, 0, 1],
[1, 1, 1, 0, 1, 1, 0, 1, 0, 1],
[1, 0, 0, 0, 1, 0, 0, 1, 0, 1],
[1, 0, 0, 0, 1, 0, 0, 1, 0, 1],
[1, 0, 1, 1, 1, 1, 0, 1, 0, 1],
[1, 0, 0, 0, 0, 0, 0, 0, 0, 1],
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
];

It is also possible to modify the map in real-time: write a character in the boxes you want to swap, then hit Refresh map.

Moving involves adding (or subtracting for backwards movements) to the xy coordinates, using basic trigonometry, but only after checking the validity of the move (i.e. that it will not collide with a wall):


function Camera() {
...

this.move = function(distance) {
// return whether valid move or not
x = this.x + Math.cos(this.theta) * distance;
y = this.y + Math.sin(this.theta) * distance;
if (isValidPos(x, y)) {
this.x = x;
this.y = y;
return true;
}
return false;
};
}

function moveUp() {
readMapFromSheet(sheet); // Retrieve the map from the sheet
var camera = new Camera();
camera.readFromSheet(sheet); // Retrieve the camera state from the sheet
camera.move(0.5);
raycast(camera);
}

Turning left (respectively right) is even simpler, adding (respectively subtracting) small constants to the camera angle (mod 2 PI):


function Camera() {
...

this.rotate = function(alpha) {
this.theta = (this.theta + alpha + 2 * Math.PI) % (2 * Math.PI);
};
}

function lookRight() {
readMapFromSheet(sheet);
var camera = new Camera();
camera.readFromSheet(sheet);
camera.rotate(-0.25);
raycast(camera);
}

Actual actions (moving/turning) are shown in a menu:


spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
var subMenus = [
{name:"Reset",functionName:"onOpen"},
{name:"Refresh map",functionName:"refresh"},
{name:"Move forward",functionName:"up"},
{name:"Look left",functionName:"left"},
{name:"Look right",functionName:"right"},
{name:"Move backward",functionName:"down"},
{name:"Turn around",functionName:"turn"},
];
spreadsheet.addMenu("Sheetcaster", subMenus);

The ray is cast as follows:

  • Its origin is the camera's 2D coordinates in the map plane
  • Its direction is calculated off the camera's and the column index (the center column will have the exact same direction as the camera; the other columns' directions depend on the field of view parameter)


/*
* Given a value on the x axis (screen column),
* return the ray that will be cast
*/
function getRay(camera, x) {
var cos = Math.cos(camera.theta);
var sin = Math.sin(camera.theta);

// from -1 to 1: 0 being when x is the middle column
var k = ((SIZE_X / 2) - x) / SIZE_X;

return new Vector_(
cos / 2 - k * sin * K_FOV,
sin / 2 + k * cos * K_FOV
);
}

Moving the ray is the most involved step:

  • Calculate the distance to the next vertical and horizontal borders
  • Move to the closest border


while (!hit) {
// Next potential wall is on the x axis
if (dist.x < dist.y) {
// Distance from the camera, delta:
/ Distance between each horizontal wall along the ray
dist.x += delta.x;
// step.x is either 1 or -1, depending on the ray direction
mapCoord.x += step.x;
hit = readMap_(mapCoord.x, mapCoord.y);
} else { // Next potential wall is on the y axis
dist.y += delta.y;
mapCoord.y += step.y;
hit = readMap_(mapCoord.x, mapCoord.y);
}
}

The height of the drawn column is nothing fancy: the further the wall, the smaller-looking the wall, hence the smaller the height of the column.

Again, nothing really complicated. However, the simplicity of this wall-height technique is the reason behind its major caveat: there is no clean way to look up or down: you can only turn left or right, and move forward or backward.

Displaying the rendered image is done using a spreadsheet. Each cell becomes a small square pixel, its color being the background color of the cell. We pass our scren buffer matrix to the handy setBackgroundColors:


sheet.getRange(1, 1, SIZE_Y, SIZE_X).setBackgroundColors(screen);

As you probably noticed, the low display density makes the sharp, jagged, edges really visible. Fear not, reader, for we also implemented anti-aliasing!

The anti-aliasing algorithm is even simpler:

  1. Accumulate the length of runs (successions of same-sized columns)
  2. Draw a gradient, from the background (wall and floor) to the wall, above (and below) the columns

When the runs are really small (< 5 columns), we attenuate the gradient intensity, as it would only add another pixel above (below) the column, thus rendering the antialiasing utterly useless.

Real-time was not an objective, the main problem being controlling the player/camera. Scripted movements should however be quite easy to implement with a fixed duration loop, restarting itself using an Apps Script recurrent time-driven trigger (a minute-long loop, repeated every minute). This is left as an exercise to the reader.

Please feel free to copy the script and walk around this Apps Script virtual world.


Thomas Coudray

Thomas is interested in low level computing and application security.                               


Amaury de la Vieuville

Amaury is passionate about algorithmic problem-solving and software engineering.


Ahmed Bougacha

Ahmed is interested in kernels, compilers and theoretical computer science.                               

URL: http://googleappsdeveloper.blogspot.com/2012/03/sheetcaster-3d-in-apps-script.html

[Gd] Chrome for Android Beta Update

| More

Chrome Releases: Chrome for Android Beta Update

Chrome for Android Beta has been updated to 0.16.4301.233 (Chrome 16.0.912.77). Primarily focused on bug fixes, this update addresses issues in the compatibility check which prevented Chrome from starting up on some versions of Android 4.0, Ice Cream Sandwich.

Known issues:

  • 112923 : No way to toggle between mobile/desktop UA
  • 113140 : Youtube links do not prompt for which application to use
  • 113132 : Chrome for Android beta doesn't support configured proxy in wi-fi settings
  • Other notable issues listed here

If you find a new issue, please let us know by
filing a bug.  More information on Chrome for Android is available on the Chrome site.

Srikanth Rajagopalan
Google Chrome
URL: http://googlechromereleases.blogspot.com/2012/03/chrome-for-android-beta-update.html

[Gd] Stable Channel Update for Chromebooks

| More

Chrome Releases: Stable Channel Update for Chromebooks


The Stable channel has been updated to 17.0.963.66 (Platform version: 1412.223.0) for Chromebooks (Acer AC700, Samsung Series 5, and Cr-48).

Release highlights:
  • Pepper flash: release 11.1.31.322
  • Stability & security fixes
If you find new issues, please let us know by visiting our help site or filing a bug. Interested in switching to the Beta channel? Find out how. You can submit feedback using ‘Report an issue’ under the wrench menu.

Orit Mazor
Google Chrome
URL: http://googlechromereleases.blogspot.com/2012/03/stable-channel-update-for-chromebooks.html

Wednesday, March 7, 2012

[Gd] Dev Channel Update

| More

Chrome Releases: Dev Channel Update

The Dev channel has been updated to 19.0.1061.1 for Windows, Mac, Linux and Chrome Frame.  This build contains following updates:

  • Updated V8 - 3.9.13.0
  • Added remote file system support for File object by 'create-snapshot-first' approach (Issue: 115603)
  • Fixed overlap of apps in NTP when deleting and reinstalling app (Issue: 116284)
  • Fixed issues - 116174, 115309, 115858, 108239, 115399, 105054 (ChromeOS-specific)
Full details about what changes are in this build are available in the SVN revision log. Interested in switching release channels?  Find out how.  If you find a new issue, please let us know by filing a bug.

Dharani Govindan
Google Chrome
URL: http://googlechromereleases.blogspot.com/2012/03/dev-channel-update.html

[Gd] Stable Channel Update

| More

Chrome Releases: Stable Channel Update

The Chrome Stable channel has been updated to 17.0.963.66 on Windows, Mac, Linux and Chrome Frame.  This release fixes an issue in the DOM.  Interested in hopping on the stable channel?  Find out how.  If you find a new issue, please let us know by filing a bug.

Jason Kersey
Google Chrome


URL: http://googlechromereleases.blogspot.com/2012/03/stable-channel-update.html

Tuesday, March 6, 2012

[Gd] Introducing Google Play

| More

Android Developers Blog: Introducing Google Play



[This post is by Kenneth Lui, Android Developer Ecosystem. —Dirk Dougherty]

For more than a year we’ve been focused on expanding the reach, content, and monetization opportunities of Android Market. We started by extending the store to users on the web and then went on to add books, movies, and music. The number of people who have visited, registered, and downloaded from the store has been amazing.



Today we’re launching Google Play, an integrated destination for apps, books, movies, and music, accessible to users on Android devices and to anyone on the Web. As part of this launch, Google Play replaces and extends Android Market — users everywhere can now find their favorite apps and games in Google Play, with other digital content, all in one place.



We believe that with a strong brand, compelling offerings, and a seamless purchasing and consumption experience, Google Play will drive more traffic and revenue to the entire ecosystem.



We’ll be investing in the brand to bring Google Play to as many people as possible, and we’ll also invest in the latest digital content to keep Google Play fresh, relevant, and engaging. Apps and games remain the core of Google Play, so we’ll continue investing in new ways to connect users with their favorite apps, and developers with new customers.







As we grow and promote Google Play around the world, we’ll be marketing your apps and games at the same time. Our policies have not changed and our goal is still the same — to create a great, open marketplace for distributing Android apps.



Google Play is built on the same infrastructure as Android Market, so the transition for users and developers will be seamless. Users can sign into their existing accounts with the same credentials as before and purchase content using the same payment methods. As a developer, there’s no change needed to your published products and you can continue to use the same publishing tools to put your app in front of hundreds of millions of Android users. If your app was in Android Market yesterday, it’s in Google Play today.



We’ll be rolling out Google Play to devices in a phased OTA update, starting today and continuing over the days to come. With the update, the Android Market app will upgrade to the Play Store app and the Music, Videos, and Books apps will upgrade to Play Music, Play Movies, and Play Books. This update is for devices running Android 2.2 or higher, and users on other devices will continue to have the same access to your apps as before.



You can start sending customers to your products in Google Play right away. Check out the updated “Get it on Google Play” badges and look for an email with more details on the transition. In the meantime, you can check out the Google Play web site at the link below and join the discussion on +Android Developers.



http://play.google.com

URL: http://android-developers.blogspot.com/2012/03/introducing-google-play.html

[Gd] Android Apps Break the 50MB Barrier

| More

Android Developers Blog: Android Apps Break the 50MB Barrier

Android applications have historically been limited to a maximum size of 50MB. This works for most apps, and smaller is usually better — every megabyte you add makes it harder for your users to download and get started. However, some types of apps, like high-quality 3D interactive games, require more local resources.

So today, we’re expanding the Android app size limit to 4GB.

The size of your APK file will still be limited to 50MB to ensure secure on-device storage, but you can now attach expansion files to your APK.

  • Each app can have two expansion files, each one up to 2GB, in whatever format you choose.

  • Android Market will host the files to save you the hassle and cost of file serving.

  • Users will see the total size of your app and all of the downloads before they install/purchase.

On most newer devices, when users download your app from Android Market, the expansion files will be downloaded automatically, and the refund period won’t start until the expansion files are downloaded. On older devices, your app will download the expansion files the first time it runs, via a downloader library which we’ve provided below.

While you can use the two expansion files any way you wish, we recommend that one serve as the initial download and be rarely if ever updated; the second can be smaller and serve as a “patch carrier,” getting versioned with each major release.

Helpful Resources

In order to make expansion file downloading as easy as possible for developers, we're providing sample code and libraries in the Android SDK Manager.

  • In the Google Market Licensing package, an updated License Verification Library (LVL). This minor update mostly adds the ability to obtain expansion file details from the licensing server.

  • From the Google Market APK Expansion package, the downloader service example. The library makes it relatively simple to implement a downloader service in your application that follows many of our best practices, including resuming downloads and displaying a progress notification.

Because many developers may not be used to working with one or two large files for all of their secondary content, the example code also includes support for using a Zip file as the secondary file. The Zip example implements a reasonable patching strategy that allows for the main expansion file to “patch” the APK and the patch file to “patch” both the APK and the main expansion file by searching for asset files in all three places, in the order patch->main->APK.

Expansion File Basics

Expansion files have a specific naming convention and are located in a specific place for each app. As expansion files are uploaded to the publisher site, they are assigned a version code based upon the version of the APK that they are associated with. The naming convention and location are as follows:

Location: <shared-storage>/Android/obb/<package-name>/
Filename: [main|patch].<expansion-version>.<package-name>.obb
Example: /sdcard/Android/obb/com.example.myapp/main.5.com.example.myapp.obb

Expansion files are stored in shared storage. Unlike APK files, they can be read by any application.

Downloading and Using the Expansion Files

When the primary activity for the app is created, it should check to make sure the expansion files are available. The downloader library provides helper functions (for example the “Helpers” class in the code below) to make this easy.

boolean expansionFilesDelivered() {
// get filename where main == true and version == 3
String fileName = Helpers.getExpansionAPKFileName(this, true, 3);
// does the file exist with FILE_SIZE?
if (!Helpers.doesFileExist(this, fileName, FILE_SIZE, false)) {
return false;
}
return true;
}

If the file does not exist, fire up the downloader service with DownloaderClientMarshaller.startDownloadServiceIfRequired(). The downloader will perform an LVL check against the server. This check will deliver the names of the files, file sizes, and the file URLs.

Once that check has been completed, it will begin downloading the files. You don’t have to use our download solution, but you might want to because we:

  • Include a notification UI that provides progress and estimated completion time in layouts customized for ICS and pre-ICS devices

  • Resume large files safely

  • Handle redirection with appropriate limits

  • Run in the background as a service

  • Pause and resume downloads when WiFi is not available

Enjoy! We can’t wait to see what kinds of things developers do with this! For more information about how to use expansion files with your app, read the APK Expansion Files developer guide.

[This post wasn’t actually written by anyone, but bashed out by a posse of engineering and product-management people. Heavy bashers included Dan Galpin, Ilya Firman, Andy Stadler, Michael Siliski, and Ellie Powers.]

URL: http://android-developers.blogspot.com/2012/03/android-apps-break-50mb-barrier.html

[Gd] Keeping your free hosting service valuable for searchers

| More

Official Google Webmaster Central Blog: Keeping your free hosting service valuable for searchers

Webmaster level: Advanced

Free web hosting services can be great! Many of these services have helped to lower costs and technical barriers for webmasters and they continue to enable beginner webmasters to start their adventure on the web. Unfortunately, sometimes these lower barriers (meant to encourage less techy audiences) can attract some dodgy characters like spammers who look for cheap and easy ways to set up dozens or hundreds of sites that add little or no value to the web. When it comes to automatically generated sites, our stance remains the same: if the sites do not add sufficient value, we generally consider them as spam and take appropriate steps to protect our users from exposure to such sites in our natural search results.

We consider automatically generated sites like this one to be spammy.

If a free hosting service begins to show patterns of spam, we make a strong effort to be granular and tackle only spammy pages or sites. However, in some cases, when the spammers have pretty much taken over the free web hosting service or a large fraction of the service, we may be forced to take more decisive steps to protect our users and remove the entire free web hosting service from our search results. To prevent this from happening, we would like to help owners of free web hosting services by sharing what we think may help you save valuable resources like bandwidth and processing power, and also protect your hosting service from these spammers:
  • Publish a clear abuse policy and communicate it to your users, for example during the sign-up process. This step will contribute to transparency on what you consider to be spammy activity.
  • In your sign-up form, consider using CAPTCHAs or similar verification tools to only allow human submissions and prevent automated scripts from generating a bunch of sites on your hosting service. While these methods may not be 100% foolproof, they can help to keep a lot of the bad actors out.
  • Try to monitor your free hosting service for other spam signals like redirections, large numbers of ad blocks, certain spammy keywords, large sections of escaped JavaScript code, etc. Using the site: operator query or Google Alerts may come in handy if you’re looking for a simple, cost efficient solution.
  • Keep a record of signups and try to identify typical spam patterns like form completion time, number of requests sent from the same IP address range, user-agents used during signup, user names or other form-submitted values chosen during signup, etc. Again, these may not always be conclusive.
  • Keep an eye on your webserver log files for sudden traffic spikes, especially when a newly-created site is receiving this traffic, and try to identify why you are spending more bandwidth and processing power.
  • Try to monitor your free web hosting service for phishing and malware-infected pages. For example, you can use the Google Safe Browsing API to regularly test URLs from your service, or sign up to receive alerts for your AS.
  • Come up with a few sanity checks. For example, if you’re running a local Polish free web hosting service, what are the odds of thousands of new and legitimate sites in Japanese being created overnight on your service? There’s a number of tools you may find useful for language detection of newly created sites, for example language detection libraries or the Google Translate API v2.

Last but not least, if you run a free web hosting service be sure to monitor your services for sudden activity spikes that may indicate a spam attack in progress.

For more tips on running a quality hosting service, have a look at our previous post. Lastly, be sure to sign up and verify your site in Google Webmaster Tools so we may be able to notify you when needed or if we see issues.

Written by Fili Wiese (Ad Traffic Quality Team) & Kaspar Szymanski (Search Quality Team)
URL: http://googlewebmastercentral.blogspot.com/2012/03/keeping-your-free-hosting-service.html

[Gd] “Super Tuesday” Reporting, Powered by YouTube Direct

| More

YouTube API Blog: “Super Tuesday” Reporting, Powered by YouTube Direct

It’s Presidential election season in the United States, and YouTube’s News and Politics team is partnering with Storyful to highlight timely political videos from across the country. With that in mind, we’re excited to announce that citizen journalists can now submit videos documenting the election process by using the new Android and iOS mobile applications powered by YouTube Direct and released by Storyful. Both applications are based on the open source code examples we’ve released for Android and iOS, and submit videos to the instance of YouTube Direct that Storyful curates.

Tomorrow is “Super Tuesday,” when 10 states will hold their primary elections. If you live in one of the Super Tuesday states, we encourage you to install the Storyful Direct mobile application and shoot some footage documenting your political experience—a selection of videos will appear on YouTube and google.com/elections throughout the day. Even if you don’t live in a state that’s holding a primary tomorrow, the Storyful Direct apps can be used to document your experience during the runup to the Presidential election in November.

And if you’re a developer who isn’t yet familiar with the YouTube Direct platform, you can find all the information you need to get started with the web and mobile platforms at the Google Code project page.

Cheers,
—Jeffrey Posnick, YouTube API Team
URL: http://apiblog.youtube.com/2012/03/super-tuesday-reporting-powered-by.html

[Gd] Game On

| More

Chromium Blog: Game On

Hundreds of millions play games on the web everyday - including most of us on the Chrome team. Between building new virtual cities and slaying dragons, we’re also working on making the web a better platform for game developers. With GDC about to start, we wanted to give you a quick update on these efforts.

First, we’re collaborating with all browser vendors to give you access to exciting new HTML5 APIs such as Gamepad, Mouse Lock and Fullscreen. These can help you create more immersive experiences for your users.

Second, Native Client continues to gain momentum. Today, the BlitzTech Gaming engine and the Havok Physics Engine announced support for Native Client, enriching an ecosystem that includes Unity, Moai, Bullet and other leading middleware providers. Already many game developers have been using NaCl to bring their games to Chrome’s hundreds of millions of users including brand new titles from Ubisoft, Carbon Games, Spacetime Studios, FuzzyCube Software, Klei Entertainment and Fire Hose Games.

Third, we’re working closely with other teams at Google to improve and simplify distribution and monetization for game developers. All games in the Chrome Web Store now have access to an improved In-App Payments solution that includes support for more currencies and an optimized payment flow. This includes all Google+ games that will soon be listed in the store.

To learn more on how you can also benefit from the emergence of the browser as a game platform, visit us at developers.google.com/games. And if you are attending GDC this week, come and say hi.

Posted by Christian Stefansen, Product Manager
URL: http://blog.chromium.org/2012/03/game-on.html

[Gd] Dev Channel Update for Chromebooks

| More

Chrome Releases: Dev Channel Update for Chromebooks

The Dev channel has been updated to 19.0.1055.3 (Platform version: 1861.3.0) for Chromebooks (Acer AC700, and Samsung Series 5).

Highlights:

  • Introducing new full-screen video and audio player
  • New file formats supported: rar, tar, tar.gz, and tar.bz2
  • Combined settings pages (still under development)
Known issues:
  • Issue 25642: Selecting "Open Date and time options" from Time drop-down does not open the Date/Time settings page
  • Issue 26778: Deleting a certificate causes chrome to crash
  • Issue 27094 in chromium-os: Cannot connect to 802.1x network using EAP_TLS
  • Issue 26823: wpa_supplicant crashes
If you find new issues, please let us know by visiting our help site or filing a bug. You can also submit feedback using "Report an issue" under the wrench icon. Interested in switching to the Dev channel? Find out how.

Orit Mazor
Google Chrome
URL: http://googlechromereleases.blogspot.com/2012/03/dev-channel-update-for-chromebooks.html