Friday, June 28, 2013

[Gd] Chrome Beta for Android Update

| More

Chrome Releases: Chrome Beta for Android Update

The Chrome for Android Beta channel has been updated to 28.0.1500.64 This release has a number of crash fixes as well as the following fixes:
  • 248090: Gmail - on-screen keyboard is automatically dismissed when replying to an email
  • 251809: Dangerous Downloads - 'Starting download...' toast displayed when user taps Cancel
  • 251818: Synced favicons don't show up in Other Devices on Clank
  • 239685: White flash when creating new tab page.
Known issues:
  • 243602: Page jumps up and down when loaded in landscape mode
  • 238881: Cursor should be placed at the end of the string after inserting text via autofill suggestion
  • 237920: Sometimes a thin line of background page is seen when a video goes fullscreen through FS API
A partial list of changes in this build is available in the SVN revision log. If you find a new issue, please let us know by filing a bug. More information about Chrome for Android is available on the Chrome site.

Jason Kersey
Google Chrome
URL: http://googlechromereleases.blogspot.com/2013/06/chrome-beta-for-android-update_28.html

[Gd] Beta Channel Update for Chrome OS

| More

Chrome Releases: Beta Channel Update for Chrome OS

The Beta channel has been updated to 28.0.1500.66 (Platform version: 4100.53.1 for all Chrome OS devices except Cr-48 which as 4100.53.2). This build contains a crash fix: Fixes crash in UI (254340)

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...’ in the Chrome menu (3 horizontal bars in the upper right corner of the browser).

Danielle Drew
Google Chrome
URL: http://googlechromereleases.blogspot.com/2013/06/beta-channel-update-for-chrome-os_28.html

[Gd] Dev Channel Update for Chrome OS

| More

Chrome Releases: Dev Channel Update for Chrome OS

The Dev channel has been updated to 29.0.1547.2 (platform version: 4319.3.0) for all platforms except the new Samsung Chromebook, the HP Chromebook and Samsung Chromebox.  This release contains a few important updates and bug 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...’ in the Chrome menu (3 horizontal bars in the upper right corner of the browser).

Ben Henry
Google Chrome
URL: http://googlechromereleases.blogspot.com/2013/06/dev-channel-update-for-chrome-os_28.html

[Gd] Testing on the Toilet: Fake Your Way to Better Tests

| More

Google Testing Blog: Testing on the Toilet: Fake Your Way to Better Tests

By Jonathan Rockway and Andrew Trenk

This article was adapted from a Google Testing on the Toilet (TotT) episode. You can download a printer-friendly version of this TotT episode and post it in your office.

After many years of blogging, you decide to try out your blog platform's API. You start playing around with it, but then you realize: how can you tell that your code works without having your test talk to a remote blog server?

public void deletePostsWithTag(Tag tag) {
for (Post post : blogService.getAllPosts()) {
if (post.getTags().contains(tag)) { blogService.deletePost(post.getId()); }
}
}

Fakes to the rescue! A fake is a lightweight implementation of an API that behaves like the real implementation, but isn't suitable for production. In the case of the blog service, all you care about is the ability to retrieve and delete posts. While a real blog service would need a database and support multiple frontend servers, you don’t need any of that to test your code, all you need is any implementation of the blog service API. You can achieve this with a simple in-memory implementation:

public class FakeBlogService implements BlogService {  
private final Set<Post> posts = new HashSet<Post>(); // Store posts in memory
public void addPost(Post post) { posts.add(post); }
public void deletePost(int id) {
for (Post post : posts) {
if (post.getId() == id) { posts.remove(post); return; }
}
throw new PostNotFoundException("No post with ID " + id);
}
public Set<Post> getAllPosts() { return posts; }
}

Now your tests can swap out the real blog service with the fake and the code under test won't even know the difference.

Fakes are useful for when you can't use the real implementation in a test, such as if the real implementation is too slow (e.g. it takes several minutes to start up) or if it's non-deterministic (e.g. it talks to an external machine that may not be available when your test runs).

You shouldn't need to write your own fakes often since each fake should be created and maintained by the person or team that owns the real implementation. If you’re using an API that doesn't provide a fake, it’s often easy to create one yourself: write a wrapper around the part of the code that you can't use in your tests, and create a fake for that wrapper. Remember to create the fake at the lowest level possible (e.g. if you can't use a database in your tests, fake out the database instead of faking out all of your classes that talk to the database), that way you'll have fewer fakes to maintain, and your tests will be executing more real code for important parts of your system.

Fakes should have their own tests to ensure that they behave like the real implementation (e.g. if the real implementation throws an exception when given certain input, the fake implementation should also throw an exception when given the same input). One way to do this is to write tests against the API's public interface, and run those tests against both the real and fake implementations.

If you still don't fully trust that your code will work in production if all your tests use a fake, you can write a small number of integration tests to ensure that your code will work with the real implementation.
URL: http://googletesting.blogspot.com/2013/06/testing-on-toilet-fake-your-way-to.html

[Gd] Admin Console Update

| More

Chrome Releases: Admin Console Update


The Admin console has been updated. This update adds a new device setting for automatically enrolled devices to be placed in the enrolling user's organizational unit

Known issues are available here. Enterprise customers can report an issue by contacting support.

Lawrence Lui


Google Chrome
URL: http://googlechromereleases.blogspot.com/2013/06/admin-console-update.html

[Gd] Beta Channel Update

| More

Chrome Releases: Beta Channel Update

The Beta channel has been updated to 28.0.1500.63 for Windows, Mac, and Chrome Frame, and Linux.  Full details about what changes are in this build are available in the SVN revision log.

For more information about features coming to Chrome, check out the Chrome Blog.

Interested in switching release channels? Find out how. If you find a new issue, please let us know by filing a bug.

Anthony Laforge
Google Chrome
URL: http://googlechromereleases.blogspot.com/2013/06/beta-channel-update_27.html

[Gd] Beta Channel Update for Chrome OS

| More

Chrome Releases: Beta Channel Update for Chrome OS

The Beta channel has been updated to 28.0.1500.61 (Platform version: 4100.53.0) for all Chrome OS devices. This build contains a number of bug fixes and security enhancements.

Some highlights of these changes are:
  • Pepper Flash updated to 11.8.800.68-r8, which improves playback quality and reduces crashes on numerous video sites.
  • Numerous video and other 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...’ in the Chrome menu (3 horizontal bars in the upper right corner of the browser).

Danielle Drew
Google Chrome
URL: http://googlechromereleases.blogspot.com/2013/06/beta-channel-update-for-chrome-os_27.html

[Gd] Introducing Google Docs Cursor/Selection APIs in Apps Script

| More

Google Apps Developer Blog: Introducing Google Docs Cursor/Selection APIs in Apps Script

Ever wanted to programmatically insert something at the cursor in Google Docs (say, a “Sign Here” image) or read the user’s selection (maybe for an on-the-spot translation)? Starting today, you can.

Apps Scripts bound to Google Docs can now access the active user's Cursor and Selection by calling Document.getCursor() and Document.getSelection(), respectively. The returned objects provide useful information like the element the cursor is positioned in and an array of all of the elements contained in the selection.


Example #1: Selection Translator

This Google Doc contains a simple script that uses Apps Script’s Language Service to translate selected text from English to Spanish through a custom menu item.


Here, it uses the getSelectedElements() method of the Selection class to get an array of selected elements:


var selection = DocumentApp.getActiveDocument().getSelection();
if (selection) {
var elements = selection.getSelectedElements();

Next, it loops through each element, performs the translation, and replaces the original text:


var translatedText = LanguageApp.translate(
element.asText().getText(), 'EN', 'ES');
element.asText().setText(translatedText);

Example #2: Bibliography App

At Google I/O this year, Apps Script engineer Jonathan Rascher demonstrated Bibstro, a bibliography sample app for Google Docs that inserts inline citations at the cursor. Today, we’re releasing the source code for Bibstro; you can also try it out by making of copy of this Google Doc.


To insert text, the script calls the aptly named insertText() method of the Cursor object:


var cursor = DocumentApp.getActiveDocument().getCursor();
if (cursor) {
// Determine the text of the new inline citation to insert.
var citation = bibStrategy.getInlineCitationText(...);

var surroundingText = cursor.getSurroundingText().getText();
var surroundingTextOffset = cursor.getSurroundingTextOffset();

if (surroundingTextOffset > 0 &&
surroundingText.charAt(surroundingTextOffset - 1) != ' ') {
// If the cursor follows a non-space character, insert a space
// and then the citation.
cursor.insertText(' ' + citation);
} else {
// Otherwise, just insert the citation.
cursor.insertText(citation);
}
}

You’ll also notice that the script uses the Cursor class’s getSurroundingText() method to determine whether to insert a space before the new inline citation.


Example #3: Cursor Inspector

To help you become familiar with how cursor and selection work, we've also created a Cursor Inspector sample script. As you navigate through a document, the script displays up-to-date information about your cursor or selection in a custom sidebar. We’re also releasing the source code for Cursor Inspector on GitHub.


These new APIs are available immediately. We’re excited to see what kind of scripts you come up with!


Kalyan Reddy profile | Stack Overflow

Kalyan is a Developer Programs Engineer on the Google Apps Script team in New York City. He is committed to increasing developers’ productivity by helping them fully utilize the power of Apps Script. In his free time, he enjoys participating in the maker community and hacking together robots.

URL: http://googleappsdeveloper.blogspot.com/2013/06/introducing-google-docs-cursorselection.html

Thursday, June 27, 2013

[Gd] Experimenting with QUIC

| More

Chromium Blog: Experimenting with QUIC

At Google, we're always working to make the web faster. The SPDY protocol, which is now the foundation of the upcoming HTTP 2.0 protocol, is a significant step forward. However, despite increasing bandwidth, round trip time (RTT)--which is ultimately bounded by the speed of light--is not decreasing, and will remain high on mobile networks for the foreseeable future. To continue improving network performance we need to decrease the number of round trips, something that is difficult with protocols that currently rely on the Transmission Control Protocol (TCP).

QUIC (Quick UDP Internet Connections) is an early-stage network protocol we are experimenting with that runs a stream multiplexing protocol over a new flavor of Transport Layer Security (TLS) on top of UDP instead of TCP. QUIC combines a carefully selected collection of techniques to reduce the number of round trips we need as we surf the Internet. You can learn more in the design document, but here are some of the highlights:
  • High security similar to TLS
  • Fast (often 0-RTT) connectivity similar to TLS Snapstart combined with TCP Fast Open
  • Packet pacing to reduce packet loss
  • Packet error correction to reduce retransmission latency
  • UDP transport to avoid TCP head-of-line blocking
  • A connection identifier to reduce reconnections for mobile clients
  • A pluggable congestion control mechanism
We've been working on both a QUIC client implementation and prototype server implementation in the open source Chromium repository for the past few months. Early tests of UDP connectivity have been promising, but we have learned from past experience that real-world network conditions often differ considerably. Our next step is to test the pros and cons of the QUIC design in the real world by experimenting with using QUIC for a small percentage of Chrome dev and canary channel traffic to some Google servers, just as we did with SPDY. Users shouldn't notice any difference--except hopefully a faster load time. If we're able to identify clear performance wins, our hope is to collaborate with the rest of the community to develop the features and techniques of QUIC into network standards. 

You can learn more about QUIC in our FAQ. Our hope is that what we learn from QUIC will ultimately help us to deliver a much faster... er... QUICker Internet!

Posted by Jim Roskind, RTT Reduction Ranger, Google
URL: http://blog.chromium.org/2013/06/experimenting-with-quic.html

[Gd] Introducing website satisfaction by Google Consumer Surveys

| More

Official Google Webmaster Central Blog: Introducing website satisfaction by Google Consumer Surveys


Webmaster level: all

We're now offering webmasters an easy and free way to collect feedback from your website visitors with website satisfaction surveys. All you have to do is paste a small snippet of code in the HTML for your website and this will load a discreet satisfaction survey in the lower right hand corner of your website. Google automatically aggregates and analyzes responses, providing the data back to you through a simple online interface.


Users will be asked to complete a four-question satisfaction survey. Surveys will run until they have received 500 responses and will start again after 30 days so you can track responses over time. This is currently limited to US English visitors on non-mobile devices. The default questions are free and you can customize questions for just $0.01 per response or $5.00 for 500 responses.


Survey Setup and Code Placement Tips

To set up the survey code, you'll need to have access to the source code for your website.
  1. Sign into Google Consumer Surveys for website satisfaction to find the code snippet.
  2. You have the option to enter the website name and URL, survey timing, and survey frequency.
  3. Click on the “Activate survey” button when ready.
  4. Once you find the code snippet on top of the setup page, copy and paste it into your web page, just before the closing </head> tag. If your website uses templates to generate pages, enter it just before the closing </head> tag in the file that contains the <head> section.
If  you have any questions, please read our Help Center article to learn more.

Posted by Marisa Currie-Rose
URL: http://googlewebmastercentral.blogspot.com/2013/06/introducing-website-satisfaction-by_27.html

[Gd] Flubaroo 3.0 Released

| More

Google Apps Developer Blog: Flubaroo 3.0 Released

Flubaroo, a popular Apps Script application that helps teachers with grading, has just reached version 3.0. The new features and improvements include:

  • Smarter emailing of grades.
  • Option to email "Help Tips" for each question.
  • Option to send students individualized feedback.
  • Multi-language support, with first language of Spanish.
  • Easier to read grade emails.

If you know any teachers who aren’t using Flubaroo yet, why not encourage them to try it out? It doesn’t cost a thing, and has helped thousands of teachers save time and gain insight into student performance — all through the power of Apps Script.


Dave Abouav   profile

Dave is a Googler who also teaches physics at community college at nights. He developed Flubaroo as his 20%-time project, and runs edCode.org, a community of teachers and developers creating free, open-source tools for education.

URL: http://googleappsdeveloper.blogspot.com/2013/06/flubaroo-30-released.html

[Gd] Google Cloud Platform Powers Minyanville’s Buzz and Banter

| More

Cloud Platform Blog: Google Cloud Platform Powers Minyanville’s Buzz and Banter

Today’s post is from Philip Talamas, COO Minyanville Media, Inc., a New York based financial media company. In this post, Philip looks at the benefits his company received from switching from a major public cloud provider to Google Cloud Platform.



At Minyanville Media, our goal is to create branded business content that informs, entertains, and educates all generations about the worlds of business and finance. We designed our premium Buzz & Banter app to serve this need. The Buzz ran on a competing cloud platform that presented increasing technical challenges as we expanded our customer base and feature set. We wanted a higher performing platform offering a more flexible and deeper feature set; we wanted to be certain we were serving our longtime clients as best as we could.



We consulted our strategic technology partner MediaAgility, and the company advised us to move to Google Cloud Platform. There were two obvious benefits to switching to Google Cloud Platform from our old provider: better reliability and automatic demand-based scaling of the application.





Every day, thousands of investors access our system globally, everywhere from Syracuse to Switzerland. They turn to us for reliable market intelligence and investing ideas. Today's economic uncertainty, coupled with high frequency trading, keeps us on our toes. When a central bank unexpectedly cuts interest rates or a hacked tweet sends markets into a tailspin, seconds matter. We are timely, or we are out of business. It’s as simple as that. Additionally, we serve two major online brokerage firms, which have very high standards for performance and reliability.



Hence, we decided to move Buzz and Banter to the Google Cloud Platform. The improvement and increase in operational speed was drastic. New Buzz, running on Google App Engine, updates content instantaneously -- even before our content management system refreshes to confirm publication. The icing on the cake is that our operating costs are significantly lower than what they were under our old provider.



It’s rare that everyone wins in a technology transition, but that’s exactly what’s been accomplished in our move to Google App Engine. With a better customer experience, lower operating costs, and fewer technological headaches, we only wish that we’d made the switch sooner.



- Contributed by Philip Talamas, COO, Minyanville Media, Inc.
URL: http://googlecloudplatform.blogspot.com/2013/06/google-cloud-platform-powers-minyanville-buzz-and-banter.html

Wednesday, June 26, 2013

[Gd] Dev Channel Update for Chrome OS

| More

Chrome Releases: Dev Channel Update for Chrome OS

The Dev channel has been updated to 29.0.1547.1 (platform version: 4319.0.0) for all platforms except the HP Chromebook and Samsung Chromebox.  This release fixes some major causes of crashes as well as other bugs.

Notable Updates:
  • 225429 - Fix to Segmentation Fault in Window Manager causing many crashes.
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...’ in the Chrome menu (3 horizontal bars in the upper right corner of the browser).

Ben Henry
Google Chrome
URL: http://googlechromereleases.blogspot.com/2013/06/dev-channel-update-for-chrome-os_26.html

[Gd] Tutorial: Adding a cloud backend to your application with Android Studio

| More

Cloud Platform Blog: Tutorial: Adding a cloud backend to your application with Android Studio

Android Studio lets you easily add a cloud backend to your application, right from your IDE. A backend allows you to implement functionality such as backing up user data to the cloud, serving content to client apps, real-time interactions, sending push notifications throughGoogle Cloud Messaging for Android, and more. Additionally, having your application’s backend hosted on Google App Engine means that you can focus on what the cloud application does, without having to worry about administration, reliability or scalability.



When you create a backend using Android Studio, it generates a new App Engine application under the same project, and gives your Android application the necessary libraries and a sample activity to interact with that backend. Support for GCM is built-in, making it easy to sync data across multiple devices. Once you've generated the project, you can

build and run your client and server code together, in a single environment, and even deploy your backend code right from Android Studio.



In this post we’ll focus on how to get started with the basic setup. From there it's easy to extend the basic setup to meet your needs.



Preliminary setup

Before you get started, make sure you take care of these tasks first:

  • Download Android Studio if you haven’t done so already and set it up.

  • Make sure you have an application project set up in Android Studio. You can use any working app that you want to integrate with your backend, even a sample app.

  • If you'll be running the app on an emulator, download the Google APIs Addon from the SDK Manager and run your app on that image.

  • Create a Google Cloud Platform project: In the Cloud Console, create a new project (or reuse an old one) and make note of the Project ID. Click on the words “Project ID” on the top left to toggle to the Project Number. Copy this as well.


  • Enable GCM and obtain API Key: In the Cloud Console, click on APIs and turn on the Google Cloud Messaging for Android API. Then, click on the “Register App” button on the top left, enter a name for the app, then select “Android” and “Accessing APIs via a web server”. In the resulting screen, expand the “Server Key” box and copy the API key.


  • 1. Generate an App Engine project

    In Android Studio, open an existing Android application that you want to modify, or create a new one. Select the Android app module under the Project node. Then click Tools > Google Cloud Endpoints > Create App Engine Backend.

    In the wizard, enter the Project ID, Project Number, and API Key of your Cloud project.



    This will create:

    • An App Engine project which contains the backend application source

    • An endpoints module with a RegisterActivity class, related resources, and client libraries for the Android app to communicate with the backend

    The generated App Engine application (<app_name>-AppEngine) is an Apache Maven-based project. The Maven pom.xml file takes care of downloading all the dependencies, including the App Engine SDK. This module also contains the following:

    • A Google Cloud Endpoint (DeviceInfoEndpoint.java, auto-generated from DeviceInfo.java) that your Android app will “register” itself through. Your backend will use that registration info to send a push notification to the device.

    • A sample endpoint, MessageEndpoint.java, to list previously sent GCM messages and send new ones.

    • A starter web frontend application (index.html in webapp directory) that will show all the devices that have registered with your service, and a form to send them a GCM notification.



    The endpoints module (<app_name>-endpoints) generated for you contains the classes and libraries needed by the Android application to interact with the backend:

    • A RegisterActivity.java class that, when invoked, will go through the GCM registration flow and also register itself with the recently created backend through DeviceInfoEndpoint.

    • Client libraries, so that the application can talk to the backend using an object rather than directly using raw REST calls.

    • XML files related to the newly created activity.

    2. Add GCM registration to your app

    In your Android application, you can call RegisterActivity whenever you want the registration to take place (for example, from within the onCreate() method of your main activity.

    ...
    import android.content.Intent;
    ...

    @Override
    protected void onCreate(Bundle savedInstanceState) {
    ...
    Intent intent = new Intent(this, RegisterActivity.class);
    startActivity(intent);
    }

    3. Deploy the sample backend server

    When you're ready to deploy an update to your ( the sample ) production backend in the cloud, you can do that easily from the IDE. Click on the “Maven Projects” button on the right edge of the IDE, under Plugins > App Engine, right-click and run the appengine:update goal.



    As soon as the update is deployed, you can also access your endpoints through the APIs Explorer at http://<project-id>.appspot.com/_ah/api/explorer.

    For testing and debugging, you can also run your backend server locally without having to deploy your changes to the production backend. To run the backend locally, just set the value of LOCAL_ANDROID_RUN to true in CloudEndpointUtils.java in the App Engine module.

    4. Build and run the Android app

    Now build and run your Android app. If you called RegisterActivity from within your main activity, the device will register itself with the GCM service and the App Engine app you just deployed. If you are running the app on an emulator, note that GCM functionality requires the Google APIs Addon image, which you can download from the SDK Manager.

    You can access your sample web console on any browser at http://<project-id>.appspot.com. There, you will see that the app you just started has registered with the backend. Fill out the form and send a message to see GCM in action!

    Extending the basic setup

    It's easy to expand your cloud services right in Android Studio. You can add new server-side code and through Android Studio instantly generate your own custom endpoints to access those services from your Android app.



    - Posted by Sachin Kotwani, Product Manager
    URL: http://googlecloudplatform.blogspot.com/2013/06/tutorial-adding-cloud-backend-to-your-application-with-android-studio_26.html

    [Gd] Adding a Backend to Your App In Android Studio

    | More

    Android Developers Blog: Adding a Backend to Your App In Android Studio

    Posted by Sachin Kotwani, Google Cloud Platform team

    Android Studio lets you easily add a cloud backend to your application, right from your IDE. A backend allows you to implement functionality such as backing up user data to the cloud, serving content to client apps, real-time interactions, sending push notifications through Google Cloud Messaging for Android (GCM), and more. Additionally, having your application’s backend hosted on Google App Engine means that you can focus on what the cloud application does, without having to worry about administration, reliability or scalability.



    When you create a backend using Android Studio, it generates a new App Engine application under the same project, and gives your Android application the necessary libraries and a sample activity to interact with that backend. Support for GCM is built-in, making it easy to sync data across multiple devices. Once you've generated the project, you can build and run your client and server code together, in a single environment, and even deploy your backend code right from Android Studio.



    In this post we’ll focus on how to get started with the basic setup. From there it's easy to extend the basic setup to meet your needs.









    Preliminary setup



    Before you get started, make sure you take care of these tasks first:



    • Download Android Studio if you haven’t done so already and set it up.

    • Make sure you have an application project set up in Android Studio. You can use any working app that you want to integrate with your backend, even a sample app.

    • If you'll be running the app on an emulator, download the Google APIs Addon from the SDK Manager and run your app on that image.



    • Create a Google Cloud Platform project: In the Cloud Console, create a new project (or reuse an old one) and make note of the Project ID. Click on the words “Project ID” on the top left to toggle to the Project Number. Copy this as well.

    • Enable GCM and obtain API Key: In the Cloud Console, click on APIs and turn on the Google Cloud Messaging for Android API. Then, click on the “Register App” button on the top left, enter a name for the app, then select “Android” and “Accessing APIs via a web server”. In the resulting screen, expand the “Server Key” box and copy the API key.




    1. Generate an App Engine project



    In Android Studio, open an existing Android application that you want to modify, or create a new one. Select the Android app module under the Project node. Then click Tools > Google Cloud Endpoints > Create App Engine Backend.



    In the wizard, enter the Project ID, Project Number, and API Key of your Cloud project.





    This will create:



    • An App Engine project which contains the backend application source

    • An endpoints module with a RegisterActivity class, related resources, and client libraries for the Android app to communicate with the backend



    The generated App Engine application (<app_name>-AppEngine) is an Apache Maven-based project. The Maven pom.xml file takes care of downloading all the dependencies, including the App Engine SDK. This module also contains the following:



    • A Google Cloud Endpoint (DeviceInfoEndpoint.java, auto-generated from DeviceInfo.java) that your Android app will “register” itself through. Your backend will use that registration info to send a push notification to the device.

    • A sample endpoint, MessageEndpoint.java, to list previously sent GCM messages and send new ones.

    • A starter web frontend application (index.html in webapp directory) that will show all the devices that have registered with your service, and a form to send them a GCM notification.



    The endpoints module (<app_name>-endpoints) generated for you contains the classes and libraries needed by the Android application to interact with the backend:



    • A RegisterActivity.java class that, when invoked, will go through the GCM registration flow and also register itself with the recently created backend through DeviceInfoEndpoint.

    • Client libraries, so that the application can talk to the backend using an object rather than directly using raw REST calls.

    • XML files related to the newly created activity.



    2. Add GCM registration to your app



    In your Android application, you can call RegisterActivity whenever you want the registration to take place (for example, from within the onCreate() method of your main activity.



    ...
    import android.content.Intent;
    ...

    @Override
    protected void onCreate(Bundle savedInstanceState) {
    ...
    Intent intent = new Intent(this, RegisterActivity.class);
    startActivity(intent);
    }



    3. Deploy the sample backend server



    When you're ready to deploy an update to your ( the sample ) production backend in the cloud, you can do that easily from the IDE. Click on the “Maven Projects” button on the right edge of the IDE, under Plugins > App Engine, right-click and run the appengine:update goal.





    As soon as the update is deployed, you can also access your endpoints through the APIs Explorer at http://<project-id>.appspot.com/_ah/api/explorer.






    For testing and debugging, you can also run your backend server locally without having to deploy your changes to the production backend. To run the backend locally, just set the value of LOCAL_ANDROID_RUN to true in CloudEndpointUtils.java in the App Engine module.



    4. Build and run the Android app



    Now build and run your Android app. If you called RegisterActivity from within your main activity, the device will register itself with the GCM service and the App Engine app you just deployed. If you are running the app on an emulator, note that GCM functionality requires the Google APIs Addon image, which you can download from the SDK Manager.



    You can access your sample web console on any browser at http://<project-id>.appspot.com. There, you will see that the app you just started has registered with the backend. Fill out the form and send a message to see GCM in action!



    Extending the basic setup



    It's easy to expand your cloud services right in Android Studio. You can add new server-side code and through Android Studio instantly generate your own custom endpoints to access those services from your Android app.



    URL: http://android-developers.blogspot.com/2013/06/adding-backend-to-your-app-in-android.html

    [Gd] Dev Channel Update

    | More

    Chrome Releases: Dev Channel Update

    The Dev Channel has been updated to 29.0.1547.0 for Windows, Linux and Chrome Frame; 29.0.1547.3 for Mac. This release fixes a number of crashes, as well as other bugs. There is one known issue:
    • [253808] - Chrome hangs when disconnecting sync account
    A full list of changes is available in the SVN log. Interested in switching release channels? 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/2013/06/dev-channel-update_25.html

    Tuesday, June 25, 2013

    [Gd] Google+ page identities and the YouTube API

    | More

    YouTube API Blog: Google+ page identities and the YouTube API

    As more YouTube channels start using Google+ page identities, here are some best practices to ensure that your code can make authorized API calls to access the channel.

    With Google+ page identities, there can be many channels associated with a single Google Account. For example, when a user Alice Smith signs into her Google Account, she may have her “Alice Smith” (personal) channel on that account, and potentially additional channels, linked to Google+ pages, on associated accounts. These associated accounts do not have a password by default; she gets access to them by signing into her personal account, and then using a switcher to go back and forth between them.

    How does this channel selection work with APIs? With API access through web-based OAuth 2, the switcher comes automatically. The web flow will ask Alice which account she wants to use, after she signs into her “Alice Smith” account. The OAuth 2 tokens your application gets back work just as they do today.


    The OAuth 2 web-based “Select an account” interface, allowing a user to grant access to their personal channel or any channels linked to Google+ pages that they manage.

    If you’re not using web-based OAuth 2 (you are still relying on one of our deprecated authorization methods), or if you are an Android developer who is using OAuth 2 (there is currently no native Android account switcher), then the API will choose the “wrong” channel in some cases, or even no channel (e.g., if the personal account doesn’t have a channel). When this happens, the user has two options to specify the correct channel:

    As a best practice, we recommend that you ensure users know of these options, so your application will access the correct channel. Even more importantly, we recommend that all applications provide visual feedback letting users know which channel is currently authorized. If you’re still using version 2 of the YouTube Data API, you can retrieve the profile of the special identifier default; this corresponds to the currently authorized channel’s profile. In the version 2 response, the channel’s display name is returned as an attribute of yt:username, and the profile image can be found by looking at media:thumbnail. If you’ve started using version 3, then the method to use is channels.list() with the part=snippet and mine=true parameters set. The version 3 response contains a channel’s display name in channel.snippet.title and profile image in channel.snippet.thumbnails.default.url.

    To summarize, here are the high-level points to keep in mind:
    • OAuth 2 will automatically display a “Select an account” web interface, allowing users with multiple channels associated with their account to choose which one they’re authorizing access to.
      • ...this doesn’t apply to Android OAuth 2, yet.
    • Use of other authorization methods will mean some users need to specify which channel to use, either in their Advanced Account Settings (if they consistently use one channel), or by setting up login credentials for each channel, and using them as needed.
    • All developers are strongly encouraged to display visual feedback letting their users know which channel is currently authorized.

    Cheers,
    Jeff Posnick, YouTube API Team
    URL: http://apiblog.youtube.com/2013/06/google-page-identities-and-youtube-api.html

    [Gd] Offer Your Educational Apps On Google Play for Education

    | More

    Android Developers Blog: Offer Your Educational Apps On Google Play for Education

    Posted by Pratip Banerji, Google Play for Education team




    Last month, we announced Google Play for Education — a platform enabling developers and content providers to reach K-12 educators and students in the United States through a new Android based initiative. Google Play for Education is an extension of the Google Play Store for schools, adding curation, bulk purchasing, and instant distribution to students’ Android tablets for educational apps, books and videos. As we said at the time, we are excited to be doing our part to make technology and innovation in the classroom more accessible.



    Starting today, you can use the Google Play Developer Console to mark your apps for inclusion in Google Play for Education, which is actively being piloted in schools across the country. Marking your app identifies it as targeted for the US K-12 educational market and queues it for evaluation by a third-party network of educators. These educators perform a first-pass qualification of apps, assigning the appropriate subject, grade, and common core standards metadata, while evaluating whether they meet the Google Play for Education criteria for classroom use.



    Leading up to the fall launch, the Google Play for Education team is conducting an extensive series of pilots that include schools and students across the U.S. By marking your app for inclusion now, you will be getting your app into the hands of these schools and key influencers in the education technology community.



    Whether you already have an existing educational app or are looking to build one, take a look at our Guidelines for Apps to make sure your app is appropriate for the K-12 environment. Follow our detailed requirements and test your app to ensure it is optimized for Android tablets. Then, upload your new or updated app, mark it for inclusion in Google Play for Education, and publish. We will email you when your app has been evaluated. Depending on app submission volume, this process can take 3-4 weeks. For more information, see Get Started.



    Also please tune in to our panel for education developers on Tuesday June 25th at 10:30 AM EDT. Live from the ISTE (the International Society for Technology in Education) Conference, we’ll tell you more about developing for Google in Education and we’ll host some educators who explain what they are looking for in educational apps. The panel will be streamed on Google Developers Live and we'll make the video available to you as well.



    For more information on Google Play for Education, please visit developer.android.com/edu.

    URL: http://android-developers.blogspot.com/2013/06/offer-your-educational-apps-on-google.html

    Monday, June 24, 2013

    [Gd] Get Coding Faster Thanks to Little Green Buttons

    | More

    Cloud Platform Blog: Get Coding Faster Thanks to Little Green Buttons

    On the Google Cloud Platform team we're always looking for ways to make developers' lives easier, so you can focus on building interesting applications instead of worrying about managing infrastructure.



    We also want you to be as productive as possible when you're busy writing code. We provide an SDK which offers access to production APIs, in a way that's compatible with a local development environment.





    But sometimes you just want to dip your toes in the water, and the prospect of setting up a local development environment seems daunting. What if you just want to try out some sample code? What if you want to see how the actual production APIs will behave? What if you could share a code snippet with a colleague and your entire environment came along for the ride? What if there was a playground where you could try out APIs, all from within your web browser?



    We asked ourselves these same questions and decided to try an experiment: we created a Cloud Playground, a place for you to quickly test production APIs you're interested in using. Note: the Cloud Playground is currently limited to Python 2.7 App Engine apps.



    To get you started, we added little green buttons to our getting started documentation, which take you straight to the Cloud Playground where you can edit and run the guestbook sample code as it appears in the documentation.





    In addition, the main Cloud Playground page offers easy access to many more samples. There's even an option to clone other open source App Engine Python 2.7 template projects from Github.





    How does it work? The Cloud Playground is itself an open source project and consists of two modules:

    • mimic is a regular Python App Engine app, which serves as a development server (similar to the App Engine SDK "dev_appserver"), but which runs in the production App Engine environment, providing you access to the production APIs and environment while still offering a quick and easy way to test out bits of code.

    • bliss is a trivial browser-based code editor which lets you edit code in the mimic virtual file system (backed by the App Engine datastore), providing you with a user interface so you can see what the mimic app can do for you.

    We previously blogged about DevTable which also uses mimic to speed up refresh cycles for their App Engine developers.



    We look forward to seeing what you're able to build.





    - Posted by Fred Sauer, Developer Advocate
    URL: http://googlecloudplatform.blogspot.com/2013/06/et-coding-faster-thanks-to-little-green-buttons.html

    [Gd] Get coding faster thanks to little green buttons

    | More

    Google Developers Blog: Get coding faster thanks to little green buttons

    Author Photo
    By Fred Sauer, Developer Advocate

    Cross-posted from the Google Cloud Platform Blog

    On the Google Cloud Platform team we're always looking for ways to make developers' lives easier, so you can focus on building interesting applications instead of worrying about managing infrastructure.

    We also want you to be as productive as possible when you're busy writing code. We provide an SDK which offers access to production APIs, in a way that's compatible with a local development environment.


    But sometimes you just want to dip your toes in the water, and the prospect of setting up a local development environment seems daunting. What if you just want to try out some sample code? What if you want to see how the actual production APIs will behave? What if you could share a code snippet with a colleague and your entire environment came along for the ride? What if there was a playground where you could try out APIs, all from within your web browser?

    We asked ourselves these same questions and decided to try an experiment: we created a Cloud Playground, a place for you to quickly test production APIs you're interested in using. Note: the Cloud Playground is currently limited to Python 2.7 App Engine apps.

    To get you started, we added little green buttons to our getting started documentation, which take you straight to the Cloud Playground where you can edit and run the guestbook sample code as it appears in the documentation.


    In addition, the main Cloud Playground page offers easy access to many more samples. There's even an option to clone other open source App Engine Python 2.7 template projects from Github.


    How does it work? The Cloud Playground is itself an open source project and consists of two modules:
    • mimic is a regular Python App Engine app, which serves as a development server (similar to the App Engine SDK "dev_appserver"), but which runs in the production App Engine environment, providing you access to the production APIs and environment while still offering a quick and easy way to test out bits of code.
    • bliss is a trivial browser-based code editor which lets you edit code in the mimic virtual file system (backed by the App Engine datastore), providing you with a user interface so you can see what the mimic app can do for you.
    We previously blogged about DevTable which also uses mimic to speed up refresh cycles for their App Engine developers.

    We look forward to seeing what you're able to build.


    Fred Sauer is a Developer Advocate for the Google Cloud Platform and long-standing member of the Google App Engine team. Fred hacks in a number of open source projects for fun and maintains a particular interest in game and web development.

    Posted by Scott Knaster, Editor
    URL: http://googledevelopers.blogspot.com/2013/06/get-coding-faster-thanks-to-little.html