Thursday, December 27, 2012

Daydream: Interactive Screen Savers

Posted by Daniel Sandler, a software engineer on the Android System UI team
Daydream


I’ve always loved screen savers. Supposedly they exist for a practical purpose: protecting that big, expensive monitor from the ghosts of spreadsheets past.



But I’ve always imagined that your computer is secretly hoping you’ll stand up and walk away for a bit. Just long enough for that idle timer to expire…so it can run off and play for a little while. Draw a picture, set off fireworks, explore the aerodynamics of kitchen appliances, whatever—while always ready to get back to work at a keystroke or nudge of the mouse.



Daydream, new in Android 4.2, brings this kind of laid-back, whimsical experience to Android phones and tablets that would otherwise be sleeping. If you haven’t checked it out, you can turn it on in the Settings app, in Display > Daydream; touch When to Daydream to enable the feature when charging.



An attract mode for apps


Apps that support Daydream can take advantage of the full Android UI toolkit in this mode, which means it’s easy to take existing components of your app — including layouts, animations, 3D, and custom views—and remix them for a more ambient presentation. And since you can use touchscreen input in this mode as well, you can provide a richly interactive experience if you choose.



Daydream provides an opportunity for your app to show off a little bit. You can choose to hide some of your app’s complexity in favor of one or more visually compelling experiences that can entertain from across a room, possibly drawing the user into your full app, like a video game’s attract mode.



Figure 1. Google Currents scrolls stories past in a smooth, constantly-moving wall of news.



Google Currents is a great example of this approach: as a Daydream, it shows a sliding wall of visually-interesting stories selected from your editions. Touch a story, however, and Currents will show it to you full-screen; touch again to read it in the full Currents app.



The architecture of a Daydream



Each Daydream implementation is a subclass of android.service.dreams.DreamService. When you extend DreamService, you’ll have access to a simple Activity-like lifecycle API.



Key methods on DreamService to override in your subclass (don’t forget to call the superclass implementation):




Important methods on DreamService that you may want to call:




  • setContentView() — set the scene for your Daydream. Can be a layout XML resource ID or an instance of View, even a custom View you implement yourself.

  • setInteractive(boolean) — by default, your Daydream will exit if the user touches the screen, like a classic screen saver. If you want the user to be able to touch and interact with your Views, call setInteractive(true).

  • setFullscreen(boolean) — convenience method for hiding the status bar (see below).

  • setScreenBright(boolean) — by default, Daydreams keep the screen on at full brightness, which may not be appropriate for some situations (for example, dark rooms); setting this to false will reduce the display brightness to a very low level.



Finally, to advertise your Daydream to the system, create a <service> for it in your AndroidManifest.xml:



<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.app">
<uses-sdk android:targetSdkVersion="17" android:minSdkVersion="17" />

<application>
<service
android:name=".ExampleDaydream"
android:exported="true"
android:label="@string/my_daydream_name">
<intent-filter>
<action android:name="android.service.dreams.DreamService" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<meta-data
android:name="android.service.dream"
android:resource="@xml/dream_info" />
</service>
</application>
</manifest>


The <meta-data> tag is optional; it allows you to point to an XML resource that specifies a settings Activity specific to your Daydream. The user can reach it by tapping the settings icon next to your Daydream’s name in the Settings app.



<!-- res/xml/dream_info.xml -->
<?xml version="1.0" encoding="utf-8"?>
<dream xmlns:android="http://schemas.android.com/apk/res/android"
android:settingsActivity="com.example.app/.ExampleDreamSettingsActivity" />


Here's an example to get you going: a classic screen saver, the bouncing logo, implemented using a TimeAnimator to give you buttery-smooth 60Hz animation.




Figure 2. Will one of them hit the corner?



public class BouncerDaydream extends DreamService {
@Override
public void onDreamingStarted() {
super.onDreamingStarted();

// Our content view will take care of animating its children.
final Bouncer bouncer = new Bouncer(this);
bouncer.setLayoutParams(new
ViewGroup.LayoutParams(MATCH_PARENT, MATCH_PARENT));
bouncer.setSpeed(200); // pixels/sec

// Add some views that will be bounced around.
// Here I'm using ImageViews but they could be any kind of
// View or ViewGroup, constructed in Java or inflated from
// resources.
for (int i=0; i<5; i++) {
final FrameLayout.LayoutParams lp
= new FrameLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT);
final ImageView image = new ImageView(this);
image.setImageResource(R.drawable.android);
image.setBackgroundColor(0xFF004000);
bouncer.addView(image, lp);
}

setContentView(bouncer);
}
}

public class Bouncer extends FrameLayout implements TimeAnimator.TimeListener {
private float mMaxSpeed;
private final TimeAnimator mAnimator;
private int mWidth, mHeight;

public Bouncer(Context context) {
this(context, null);
}

public Bouncer(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}

public Bouncer(Context context, AttributeSet attrs, int flags) {
super(context, attrs, flags);
mAnimator = new TimeAnimator();
mAnimator.setTimeListener(this);
}

/**
* Start the bouncing as soon as we’re on screen.
*/
@Override
public void onAttachedToWindow() {
super.onAttachedToWindow();
mAnimator.start();
}

/**
* Stop animations when the view hierarchy is torn down.
*/
@Override
public void onDetachedFromWindow() {
mAnimator.cancel();
super.onDetachedFromWindow();
}

/**
* Whenever a view is added, place it randomly.
*/
@Override
public void addView(View v, ViewGroup.LayoutParams lp) {
super.addView(v, lp);
setupView(v);
}

/**
* Reposition all children when the container size changes.
*/
@Override
protected void onSizeChanged (int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
mWidth = w;
mHeight = h;
for (int i=0; i<getChildCount(); i++) {
setupView(getChildAt(i));
}
}

/**
* Bouncing view setup: random placement, random velocity.
*/
private void setupView(View v) {
final PointF p = new PointF();
final float a = (float) (Math.random()*360);
p.x = mMaxSpeed * (float)(Math.cos(a));
p.y = mMaxSpeed * (float)(Math.sin(a));
v.setTag(p);
v.setX((float) (Math.random() * (mWidth - v.getWidth())));
v.setY((float) (Math.random() * (mHeight - v.getHeight())));
}

/**
* Every TimeAnimator frame, nudge each bouncing view along.
*/
public void onTimeUpdate(TimeAnimator animation, long elapsed, long dt_ms) {
final float dt = dt_ms / 1000f; // seconds
for (int i=0; i<getChildCount(); i++) {
final View view = getChildAt(i);
final PointF v = (PointF) view.getTag();

// step view for velocity * time
view.setX(view.getX() + v.x * dt);
view.setY(view.getY() + v.y * dt);

// handle reflections
final float l = view.getX();
final float t = view.getY();
final float r = l + view.getWidth();
final float b = t + view.getHeight();
boolean flipX = false, flipY = false;
if (r > mWidth) {
view.setX(view.getX() - 2 * (r - mWidth));
flipX = true;
} else if (l < 0) {
view.setX(-l);
flipX = true;
}
if (b > mHeight) {
view.setY(view.getY() - 2 * (b - mHeight));
flipY = true;
} else if (t < 0) {
view.setY(-t);
flipY = true;
}
if (flipX) v.x *= -1;
if (flipY) v.y *= -1;
}
}

public void setSpeed(float s) {
mMaxSpeed = s;
}
}


This example code is handy for anything you want to show the user without burning it into the display (like a simple graphic or an error message), and it also makes a great starting point for more complex Daydream projects.



A few more idle thoughts




  • First, do no harm: Daydream is meant to run when a device is charging. However, if the Daydream consumes too much CPU, charging might happen very slowly or not at all! The system will stop your Daydream if it detects that the device is not charging, so make sure your code leaves enough power to charge the battery in a reasonable amount of time.

  • Respect the lockscreen: Daydream runs on top of the secure keyguard, which means that if you might be showing sensitive content, you need to give the user tools to control that content. For example, Photo Table and Photo Frame allow the user to select the albums from which photos will be displayed (avoiding embarrassing slideshows).

  • Screen brightness: Think about where you expect your Daydream to be used and adjust the screen brightness accordingly using setScreenBright() and possibly even using darker or brighter colors as necessary. A bedside clock will need to be dimmer than a desk clock; if you expect your Daydream to serve both purposes you'll need to give the user a choice.

  • To hide the status bar or not: Many users will need instant access to the battery level and time of day, so you should avoid using setFullscreen(), particularly if your Daydream is more informational than artistic. Daydream will start with the status bar in “lights out” mode (View.SYSTEM_UI_FLAG_LOW_PROFILE), where it’s quite unobtrusive but still shows the clock and charge status.

  • When to use settings: In general, you have a little latitude for adding extra knobs and dials to Daydream settings. After all, this is a personalization feature, so users should be encouraged to tweak things until they feel at home. Sometimes, though, a more compelling experience can come from taking an artistic stand: giving the user a choice from a small number of polished, beautiful configurations (rather than providing all the controls of a commercial airline cockpit).

  • There can be more than one: If you discover that your settings allow the user to pick between a few radically different display modes, consider splitting your Daydream into multiple DreamService implementations. For example, the photo gallery in Android 4.2 provides both the Photo Table and Photo Frame Daydreams.

  • Use an Activity for development: Most Android development tools are optimized for developing and debugging conventional Android apps; since DreamService and Activity are so similar, it can be useful to create a testing Activity that hosts the same content view as your DreamService. This way you can launch and test your code easily from your IDE as if it were any other Android project.



OK, that’s enough for now; you have the tools to go build Daydream support into your apps. Have fun with it — if you do, your users will have fun too. Oh, and when you upload your shiny new APK to Google Play, be sure to add a note to your app’s description so that users searching for Daydreams can discover it.



Further reading and samples



  • API docs for DreamService

  • Sample code: BouncerDaydream, complete project for the code snippets in this post

  • Sample code: WebView, a Daydream that shows an HTML page

  • Sample code: Colors, a Daydream that demonstrates OpenGL ES 2.0 and TextureView


Thursday, December 20, 2012

Localize Your Promotional Graphics on Google Play

Posted by Ellie Powers, Product Manager on the Google Play team



Google Play is your way to reach millions and millions of Android users around the world. In fact, since the start of 2011, the number of countries where you can sell apps has increased from 30 to over 130 — including most recently, the launch of paid app support in Israel, Mexico, the Czech Republic, Poland, Brazil and Russia, and fully two-thirds of revenue for apps on Google Play comes from outside of the United States.



To help you capitalize on this growing international audience, it’s now even easier to market your apps to users around the world, by adding images and a video URL to your Google Play store listing for each of Google Play’s 49 languages, just as you’ve been able to add localized text.






A localized feature graphic can show translated text or add local flavor to your app — for example, changing its theme to reflect local holidays. Always make sure that your feature graphic works at different sizes.



Once you’ve localized your app, you’ll want to make sure users in all languages can understand what your app does and how it can benefit them. Review the graphics guidelines and get started with localized graphics.



Localized screenshots make it clear to the user that they’ll be able to use your app in their language. As you’re adding localized screenshots, remember that a lot of people will be getting new tablets for the holidays, and loading up with new apps, so you’ll want to include localized tablet screenshots to show off your tablet layouts.



With localized videos, you can now include a language-appropriate voiceover and text, and of course show the app running in the user’s language.



Ready to add localized images and videos to your store listing? To add localized graphics and video to your apps, you need to use the Google Play Developer Console preview — once you add localized graphics, you won’t be able to edit the app using the old version anymore. Those of you who use APK Expansion Files will now want to try the new Developer Console because it now includes this feature. We’ll be adding support for Multiple APK very soon. Once you’ve saved your application in the new Developer Console, automated translations become available to users on the web and devices — with no work from you.



What are you doing to help your app reach a global audience?


Friday, December 14, 2012

Google Sync, Discontinued for Gmail Accounts

After dropping support for the free Google Apps edition, Google continues to disappoint non-paying users. The sync service powered by Exchange ActiveSync will no longer be available for Gmail users and for free Google Apps users, but the existing connections will continue to work.

"Google Sync was designed to allow access to Google Mail, Calendar and Contacts via the Microsoft Exchange ActiveSync® protocol. With the recent launch of CardDAV, Google now offers similar access via IMAP, CalDAV and CardDAV, making it possible to build a seamless sync experience using open protocols. Starting January 30, 2013, consumers won't be able to set up new devices using Google Sync; however, existing Google Sync connections will continue to function. Google Sync will continue to be fully supported for Google Apps for Business, Government and Education," informs Google.

Three other services and apps will no longer be available: Google Calendar Sync (the download link has been removed, but the app continues to work for existing users), Google Sync for Nokia S60 (no longer supported from January 30, 2013) and SyncML (will stop syncing on January 30, 2013).

While Android owners aren't affected, those who use iPhones, Windows Phones and other mobile devices will have to rely on IMAP, CalDAV and CardDAV. Sure, they are standard protocols, Google doesn't have to pay licensing fees, but Google's implementation doesn't support push. If Apple's iCloud, Yahoo Mail and AOL Mail have push support, why can't Google add it? The Gmail app for iOS has push notifications, but some people might like to use the standard mail client.

If you've already enabled Google Sync on a device, it will continue to work. Unfortunately, you won't be able to enable Google Sync on a new device starting from January 30.

Chromebooks, Best-Selling Laptops

Who said that Chromebooks aren't popular? If you look at Amazon's list of the best sellers in the "Laptop computers" category, you'll find 4 Chromebooks in the top 11:

#1: Samsung Chromebook (57 days in the top 100) - out of stock
#5: Samsung Chromebook 3G (57 days in the top 100) - out of stock
#9: Samsung Series 5 550 Chromebook (199 days in the top 100)
#11: Acer C7 Chromebook (6 days in the top 100)



What other notebooks are constantly in the top 10? Apple's MacBook Pro and MacBook Air, which are also the top-rated laptops. Samsung's ARM Chromebooks are the #9 and #10 top-rated laptops, after a long list of MacBook models.


Samsung's ARM Chromebook is also the best-selling laptop at Amazon UK:


What about France, Germany, Spain, Italy? Google says that "Chromebooks are currently sold out. We are working on getting more devices available for you soon."

Thursday, December 13, 2012

New SafeSearch Settings for Google Image Search

Google tried to simplify a feature using some clever algorithms, but made some people unhappy. Google's SafeSearch settings have always been difficult to understand and Google replaced the three options that were available (strict filtering, moderate filtering - default, no filtering) with only two options (filter explicit results, don't filter explicit results - default).

Here are the old filtering options:

- "Strict filtering filters sexually explicit video and images from Google Search result pages, as well as results that might link to explicit content."

- "Moderate filtering excludes sexually explicit video and images from Google Search result pages, but does not filter results that might link to explicit content. This is the default SafeSearch setting."

- "No filtering turns off SafeSearch filtering completely."


The new filtering options are even more difficult to understand. The default option is supposed to disable filtering, but it's actually a combination of "moderate filtering" and "no filtering", depending of the query. For innocent queries like [sherilyn fenn movies] Google switches to moderate filtering since it's not very likely that you're asking for explicit content. If you add some unambiguous keywords like "xxx" to the query, Google actually disables filtering.

Here's how Google describes the new settings: "In the SafeSearch Filtering section, click the checkbox to filter sexually explicit video and images from Google Search result pages, as well as results that might link to explicit content. If you choose to leave it unchecked, we will provide the most relevant results for your query and may serve explicit content when you search for it." So Google may show explicit images, but only if it's obvious that you're searching for it. No algorithm is perfect, so you'll probably find many examples when this doesn't work as intended.


A Google representative told CNet: "We are not censoring any adult content, and want to show users exactly what they are looking for - but we aim not to show sexually-explicit results unless a user is specifically searching for them. We use algorithms to select the most relevant results for a given query. If you're looking for adult content, you can find it without having to change the default setting - you just may need to be more explicit in your query if your search terms are potentially ambiguous. The image search settings now work the same way as in Web search."

For now, Google only changed how SafeSearch works for google.com, so the old settings are still available at google.co.uk and other country-specific Google sites.

Introducing Magazines on Google Play for the UK

Following hot on the heels of the recent launch of music on Google Play in the UK, we’re pleased to announce that from today, you’ll also be able to buy digital versions of your favourite magazines for reading on the go.

Popular titles from some of the world’s leading publishers such as Condé Nast UK, Dennis Publishing, Future, Haymarket, Hearst UK, Immediate Media and IPC Media are now available for purchase on your Android phone or tablet.

Get in shape with Men’s Fitness, cook up a storm with olive, work off all that turkey and Christmas pudding with Slimming World, catch up on the latest must-have gadgets with T3 and read a preview of The Hobbit in this month’s edition of Total Film.

You can stay abreast of the week’s key events with Hello!, New Statesman and The Spectator and keep on top of the latest lifestyle news with Cosmopolitan, Glamour and Tatler. Petrolheads can pick out some new wheels with What Car?, while domestic goddesses can take their inspiration from Good Housekeeping.

Browse the Play Store to find your favourite magazines, discover new titles with a 30-day free trial, buy single issues or purchase a money-saving monthly or annual subscription to leading titles such as Elle, Harper’s Bazaar, Vogue and Wired. New Nexus devices even come pre-loaded with free issues of Men’s Fitness, .net and Vogue to get you started.

All your latest issues will be instantly available on your Android tablet or phone, or online, using our web reader, and organised in your collection in the cloud. You can flip through your magazine carousel to quickly decide what to read next or simply search for a specific title in your magazine collection.


Magazines are available today to enjoy on the sofa or on the go via your Android devices and on play.google.com, so please take a look.

Posted by Avi Yaar, Product Manager, Google Play

Google Maps App for iPhone

Apple stopped using Google's maps service in iOS6 and switched to other providers. The new application added cool features like turn-by-turn navigation and vector maps, but the coverage isn't that great. There are many countries with incomplete databases of streets and points of interests, a lot of mistakes, poor geocoding accuracy, outdated maps and empty spots. Even Apple admitted that the app is not good enough.

After a few months of waiting, Google finally released a native maps app for iPhone. It requires iOS 5.1 and it's not optimized for iPad yet. The application has all the features of the old maps app and many new features: integration with Google Accounts, vector maps with 3D views, turn-by-turn navigation, Google+ Places integration, search suggestions and online search history. It doesn't have all the features from the Android app, but it's only the first version.

The interface is completely new and you need some time to get used to the new gestures. Google opted for a non-standard interface with few buttons and native controls so that you can see more of the map. "The app shows more map on screen and turns mobile mapping into one intuitive experience. It’s a sharper looking, vector-based map that loads quickly and provides smooth tilting and rotating of 2D and 3D views," explains Google.





Google also released a SDK for iOS apps. "With the Google Maps SDK for iOS, developers can feature Google Maps in their applications on the iPod Touch, iPhone, and iPad. Also, the SDK makes it simple to link to Google Maps for iPhone from inside your app, enabling your users to easily search and get directions."

Wednesday, December 12, 2012

Understanding Google

Fortune has an interview with Larry Page, Google's CEO. There are many questions about Apple, competition, managing the company, but some of the most interesting answers revolve around the word "understand".

"If we're going to do a good job meeting your information needs, we actually need to understand things and we need to understand things pretty deeply," says Larry Page. That's why Google has a single privacy policy for most of its services, that's why Google Search uses SSL when you're logged in, that's why Google experiments with combining data from multiple services, that's why Google+ was built and that's why Google values data so much. To understand things deeply.

"What you should want us to do is to really build amazing products and to really do that with a long-term focus. Just like I mentioned we have to understand apps and we have to understand things you could buy, and we have to understand airline tickets. We have to understand anything you might search for," continues Larry. There's a long list of things Google needs to understand, but your preferences help Google return better results and even anticipate your searches.

"I think in order to make our products really work well, we need to have a good way of sharing. We had 18 different ways of sharing stuff before we did Plus. Now we have one way that works well, and we're improving." If there's an easy way to share things online, this helps Google understand your preferences.

"We see the opportunity to build amazing products that are more than any of those parts. So one of my favorite examples I like to give is if you're vacation planning. It would be really nice to have a system that could basically vacation plan for you. It would know your preferences, it would know the weather, it would know the prices of airline tickets, the hotel prices, understand logistics, combine all those things into one experience. And that's kind of how we think about search," concludes Larry.

The search engine that returned the same results for all users is now a thing of the past. This worked for simple questions, for navigational queries, but it doesn't work for complex questions, for vague queries, for recommendations. Instead of showing the same results for [italian restaurant], Google can personalize them based on your location, your favorite food, your reviews and the reviews written by your friends, your Latitude check-ins.

The new Google tries to understand you and that's the secret behind Google+. Obviously, it's still about search, but it's a deeply personalized search. Google also goes beyond keywords and tries to understand concepts and the relation between them. The Knowledge Graph and the Social Graph define the new Google.

Sound Search for Google Play widget, now available on Google Play

“What's this song?” Starting today, the Sound Search for Google Play widget is available to download from the Play store, so you can start identifying music playing around you, directly from your Android device’s homescreen.

 

Sometimes, you hear a song you like while you’re out and about but don’t want to download it right at that moment. The Sound Search widget syncs across all of your devices, so that song you recognized with your phone in the coffee shop can be quickly purchased from your tablet at home.

For devices running Android 4.2, you can add the widget directly to your device’s lockscreen, letting you recognize songs without even unlocking your phone, making it even easier for you to catch that song at the club.

The Sound Search for Google Play widget is available on Google Play for devices in the U.S. running Android 4.0 and above. After you’ve installed it, go to the widget picker and drag the Sound Search widget onto your homescreen. You can click on the widget at any time to start recognizing music around you.

Posted by Annie Chen, Software Engineer

Security Notifications for Google Accounts

A Google help center page mentions a new feature that will be added to the Google Account settings page: security notifications.


"Google notifies you via email and/or text message when your password is changed, and when we detect a suspicious attempt to sign in to your account. If you receive a notification about a password change you didn't make, or an attempt to sign in to your account that wasn't you, these email and text message notifications will provide details on next steps to help you secure your account," informs Google.

This feature should be available under the "security" tab of the Account Settings page, but I don't see it. Maybe it's enabled in your accounts.

In other related news, the Account Settings page has a new interface and shows information about your account activity, a large photo from your profile, Google Drive storage data.


{ Thanks, Herin. }

Google Zeitgeist 2012

Google's Zeitgeist page for 2012 has a lot of lists of popular searches from different categories and from different countries, so it's easy to find the people, the events, the games, the movies, songs and gadgets that defined the year 2012. It's important to keep in mind that most lists only include the queries with "the highest amount of traffic over a sustained period in 2012 as compared to 2011", so you won't find boring queries like [games] and [music], which are popular every year.

The "movers and shakers" of the year are:

1. Whitney Houston
2. Gangnam style
3. Hurricane Sandy
4. iPad 3
5. Diablo 3
6. Kate Middleton
7. Olympics 2012
8. Amanda Todd
9. Michael Clarke Duncan
10. BBB12 (Big Brother Brasil).


If you look back at the 2011 Zeitgeist list, you'll notice that "Gangnam style" replaces Rebecca Black, iPad 3 replaces both the iPhone 5 and the iPad 2, Diablo 3 replaces Battlefield 3.

The list of popular gadgets includes 6 tablets (iPad 3, iPad Mini, Nexus 7, iPad 4, Microsoft Surface and Kindle Fire), 3 phones (Galaxy S2, Galaxy Note 2, Nokia Lumia 920) and Sony's PlayStation. With so many interesting tablets released this year, it's hard to choose which one to buy.

Sometimes, Google's lists don't make a lot of sense, so you should take them with a grain of salt. Compare these 2 lists for US tech trends (for example, Note 2 is both more popular and less popular than iPhone 5):


Download the entire Zeitgeist collection [PDF] and don't miss the cool Easter Egg that shows a "Gangnam style" Android animation: mouse over the colorful bar at the bottom of the Zeitgeist page and click the robot.


{ Thanks, Arpit. }

New in Google Currents: Scan through your favorite categories, editions and breaking news

Keeping up on the news out there can be overwhelming. That's where Google Currents comes in—an app that allows you to discover, share and read your favorite news outlets, blogs and online magazines (what we together refer to as “editions”) on your smartphone or tablet—even when you’re offline. Currents is filled with great editions like The Los Angeles Times, CBS Sports, Android Central, The Guardian, Shortlist, and Forbes. Today, we’re revamping Currents to make it even easier to scan through all your favorite categories and specific editions with just the swipe of a finger. And, we’re using some of the technology behind Search to bring you breaking stories on those celebrity scandals, that fiscal cliff negotiation or hottest holiday gift.

Scan through categories 
We’re now grouping editions into categories to help you keep track of your existing subscriptions and discover new ones. Check out editions related to your interests through categories like Entertainment, Sports, Lifestyle and more. All of your content will be grouped in these categories, accessible from a sidebar. And you can organize your editions in each category with favorites on top.

We’ve also made it easy to quickly browse through top articles from all your favorite editions in a category—just swipe horizontally. If you subscribe to more than a dozen News editions like The Atlantic, ABC News and The Telegraph, you can quickly swipe through the entire category and dive into editions with articles of interest.

 

Scan through editions 
We’ve also made it easier to scan headlines in a particular edition—just swipe vertically. Want to see what’s new in Popular Science? Just swipe through through the headlines. After you view a story we’ll mark it as read, so it’s easier to see new content each time you use Currents.



Scan through breaking stories 
To help you stay up-to-date with the latest news, Google Currents now uses some of the technology behind Search to deliver the hottest breaking stories in categories such as World, Entertainment, Sports, Science and more. You’ll find new articles from hot topics that interest you, while discovering existing Currents editions you can subscribe to. Breaking stories are customized to your country and language—so we’ll only show you relevant news.


Currents optimizes editions to look great on whatever type of device you're using. Now articles shine, with larger images and layouts that are intelligently optimized for your device, whether you're on a phone or a tablet. Check out some of our newest featured partners like Cars.com, Voice of America News and New Scientist.

Back in April we expanded Google Currents internationally. Since then millions of readers around the world have downloaded Currents, reading over 700 publisher editions and tens of thousands of self-produced editions. The updated app is now available for download on Google Play and coming soon to iOS. We hope that today’s updates make keeping up with the latest news fast, easy and fun no matter where you are or what device you’re using.

Posted by Mussie Shore, Group Product Manager

Tuesday, December 11, 2012

The 2012 Android Developer Survey


The Android Developer Relations team is passionate about making Android app development a great experience, so we're asking all of you involved in building Android apps -- from engineers, to product managers, and distribution and support folks -- to let us know what you think.







We want to better understand the challenges you face when planning, designing, writing, and distributing your Android apps, so we've put together a brief (10-15min) survey that will help us test our assumptions and allow us to create better tools and resources for you.




We've had a great response from thousands of Android developers who have already responded - thank you! If you haven't yet filled in the survey, you can find it here: 2012 Android Developer Survey.



We'll be closing this year's survey this Sunday (December 17th) at 12pm Pacific Time, so be sure to get your responses in before then.



To keep the survey short and simple, there are no sections for general comments. That's because we want to hear your thoughts, questions, suggestions, and complaints all year. If there's anything you'd like to share with us, you can let us know by posting to us (publicly or privately) on Google+ at +Android Developers or using the hash tag #AndroidDev.



We can't always respond, but we're paying close attention to everything you have to say.



As always, we're looking forward to hearing your thoughts!

Monday, December 10, 2012

In-App Billing Version 3

Posted by Bruno Oliveira of the Android Developer Relations Team



In-app Billing has come a long way since it was first announced on Google Play (then Android Market). One year and a half later, the vast majority of top-grossing apps on Google Play use In-app Billing and thousands of developers monetize apps through try-and-buy, virtual goods, as well as subscriptions.



In-app Billing is expanding again, making it even more powerful and flexible so you can continue to build successful applications. Version 3 introduces the following new features:

  • An improved design that makes applications simpler to write, debug and maintain. Integrations that previously required several hundred lines of code can now be implemented in as few as 50.

  • More robust architecture resulting in fewer lost transactions.

  • Local caching for faster API calls.

  • Long-anticipated functionality such as the ability to consume managed purchases and query for product information.

In-app Billing version 3 is available now and lets you sell both in-app items and (since February 2013) subscriptions, including subscriptions with free trials. It is supported by Android 2.2+ devices running the latest version of the Google Play Store (over 90% of active devices).

Instead of the four different application components required by the asynchronous structure of the previous release, the new version of the API allows developers to make synchronous requests and handle responses directly from within a single Activity, all of which are accomplished with just a few lines of code. The reduced implementation cost makes this a great opportunity for developers who are implementing new in-app billing solutions.



Easier to Implement



In contrast to the earlier model of asynchronous notification through a background service, the new API is now synchronous and reports the result of a purchase immediately to the application. This eliminates the necessity to integrate the handling of asynchronous purchase results into the application's lifecycle, which significantly simplifies the code that a developer must write in order to sell an in-app item.



To launch a purchase, simply obtain a buy Intent from the API and start it:



Bundle bundle = mService.getBuyIntent(3, "com.example.myapp",
MY_SKU, ITEM_TYPE_INAPP, developerPayload);

PendingIntent pendingIntent = bundle.getParcelable(RESPONSE_BUY_INTENT);
if (bundle.getInt(RESPONSE_CODE) == BILLING_RESPONSE_RESULT_OK) {
// Start purchase flow (this brings up the Google Play UI).
// Result will be delivered through onActivityResult().
startIntentSenderForResult(pendingIntent, RC_BUY, new Intent(),
Integer.valueOf(0), Integer.valueOf(0), Integer.valueOf(0));
}


Then, handle the purchase result that's delivered to your Activity's onActivityResult() method:



public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == RC_BUY) {
int responseCode = data.getIntExtra(RESPONSE_CODE);
String purchaseData = data.getStringExtra(RESPONSE_INAPP_PURCHASE_DATA);
String signature = data.getStringExtra(RESPONSE_INAPP_SIGNATURE);

// handle purchase here (for a permanent item like a premium upgrade,
// this means dispensing the benefits of the upgrade; for a consumable
// item like "X gold coins", typically the application would initiate
// consumption of the purchase here)
}
}


Also, differently from the previous version, all purchases are now managed by Google Play, which means the ownership of a given item can be queried at any time. To implement the same mechanics as unmanaged items, applications can consume the item immediately upon purchase and provision the benefits of the item upon successful consumption.



Local Caching



The API leverages a new feature of the Google Play store application which caches In-app Billing information locally on the device, making it readily available to applications. With this feature, many API calls will be serviced through cache lookups instead of a network connection to Google Play, which significantly speeds up the API's response time. For example, an application could query the owned items using this call:



Bundle bundle = mService.getPurchases(3, mContext.getPackageName(), ITEM_TYPE_INAPP);
if (bundle.getInt(RESPONSE_CODE) == BILLING_RESPONSE_RESULT_OK) {
ArrayList mySkus, myPurchases, mySignatures;
mySkus = bundle.getStringArrayList(RESPONSE_INAPP_ITEM_LIST);
myPurchases = bundle.getStringArrayList(RESPONSE_INAPP_PURCHASE_DATA_LIST);
mySignatures = bundle.getStringArrayList(RESPONSE_INAPP_PURCHASE_SIGNATURE_LIST);

// handle items here
}


Querying for owned items was an expensive server call in previous versions of the API, so developers were discouraged from doing so frequently. However, since the new version implements local caching, applications can now make this query every time they start running, and as often as necessary thereafter.



Product Information



The API also introduces a long-anticipated feature: the ability to query in-app product information directly from Google Play. Developers can now programmatically obtain an item's title, description and price. No currency conversion or formatting is necessary: prices are reported in the user's currency and formatted according to their locale:



Bundle bundle = mService.getSkuDetails(3, "com.example.myapp", 
ITEM_TYPE_INAPP, skus); // skus is a Bundle with the list of SKUs to query
if (bundle.getInt(RESPONSE_CODE) == BILLING_RESPONSE_RESULT_OK) {
List detailsList = bundle.getStringArrayList(RESPONSE_SKU_DETAILS_LIST);
for (String details : detailsList) {
// details is a JSON string with
// SKU details (title, description, price, ...)
}
}


This means that, for example, developers can update prices in Developer Console and then use this API call to show the updated prices in the application (such as for a special promotion or sale) with no need to update the application's code to change the prices displayed to the user.



Sample Application



In addition to the API, we are releasing a new sample application that illustrates how to implement In-app Billing. It also contains helper classes that implement commonly-written boilerplate code such as marshalling and unmarshalling data structures from JSON strings and Bundles, signature verification, as well as utilities that automatically manage background work in order to allow developers to call the API directly from the UI thread of their application. We highly recommend that developers who are new to In-app Billing leverage the code in this sample, as it further simplifies the process of implemention. The sample application is available for download through the Android SDK Manager.



App-Specific Keys



Along with the other changes introduced with In-app Billing Version 3, we have also improved the way Licensing and In-app Billing keys are managed. Keys are now set on a per-app basis, instead of a per-developer basis and are available on the “Services & APIs” page for each application on Google Play Developer Console preview. Your existing applications will continue to work with their current keys.



Get Started!



To implement In-app Billing in your application using the new API, start with the updated In-App Billing documentation and take the Selling In-App Products training class.

Saturday, December 8, 2012

Google Reader, "Constantly on the Chopping Block"

Buzzfeed has an interesting article about the evolution of Google Reader. While the article mostly focuses on the social features that were removed from Google Reader a few months after Google+ was launched, there are some thought-provoking insights from former Google Reader engineers that reveal why the service has never been a priority for Google and why it can always be discontinued.

"In the beginning, the best word I can use is that Google tolerated the project. Then, they gave it — support is too strong a word. They gave it some thought," said Chris Wetherell, the Googler who started the project. Jenna Bilotta, a former user experience designer at Google, has a slightly different opinion: "Everyone from Google used Reader, from Larry and Sergey to the newest engineers. It's such a beloved project. Still, it was just in this limbo space. It wasn't really supported, but it wasn't actively being harmed."

The difficulty was that Reader users, while hyperengaged with the product, never snowballed into the tens or hundreds of millions. Brian Shih became the product manager for Reader in the fall of 2008. "If Reader were its own startup, it's the kind of company that Google would have bought. Because we were at Google, when you stack it up against some of these products, it's tiny and isn't worth the investment," he said. At one point, Shih remembers, engineers were pulled off Reader to work on OpenSocial, a "half-baked" development platform that never amounted to much. "There was always a political fight internally on keeping people staffed on this little project," he recalled. Someone hung a sign in the Reader offices that said "DAYS SINCE LAST THREAT OF CANCELLATION." The number was almost always zero. At the same time, user growth — while small next to Gmail's hundreds of millions — more than doubled under Shih's tenure. But the "senior types," as Bilotta remembers, "would look at absolute user numbers. They wouldn't look at market saturation. So Reader was constantly on the chopping block."

iGoogle, a much more popular service, will be discontinued next year and Google Reader's infrastructure is used to show feeds in iGoogle. Hopefully, Google Reader will still be available for some time, but it's mostly wishful thinking.

Funny Google Flights Messages

Google Flights shows some custom messages after you select your favorite flights. Depending on your destination, Google shows messages like "London, baby!", "Ahh, Paris... bon voyage!", "Have a great time in the Eternal City!" (Rome), "Have a great time in the Emerald Isle!" (Dublin), "Enjoy your trip to the Windy City!" (Chicago), "Have a great time in Music City, USA!" (Nashville), "Have a great time in Baltimore, hon!".






For most destinations, Google shows generic messages like "Hope you have fun in Frankfurt!".

Google's Card-Style OneBoxes

Google updated the desktop OneBoxes for definitions and local time to match the card layout from Google Now. The same layout is also used in the mobile search UI for most Google OneBoxes.



What's unique about the cards? They're much bigger, they include a lot more information, more white space and more distinctive headers. They stand out more and they're harder to ignore.

{ Thanks, Milivella, Arpit, Mikhail. }

Friday, December 7, 2012

YouTube's New Interface

After so many posts about YouTube's experimental interfaces, it's time for the public release. The new interface is rolled out to everyone and you no longer have to change your YouTube cookie to try it.


"On YouTube video always comes first, and with this new design the site gets out of the way and lets content truly shine. Videos are now at the top of the page, with title and social actions below. Also, playlists have been moved up, so you can easily browse through videos while you watch. Now when you subscribe to your favorite channels, we will add them to your Guide and make them available on every page of the site, and on your mobile device, tablet, and TV," explains YouTube.

The guide is actually a sidebar that's now available on every YouTube page and lets you check your subscriptions, your playlists and the video history. You can also see a list of other videos from the previous page, so you can quickly watch another search result, a different video from the same channel or another video from the homepage.


Google Apps, No Longer Free For Small Organizations

Google Apps started back in 2006 as an experimental feature that allowed you to create Gmail accounts for custom domains. Google added support for other services like Calendar and Google Talk, created a special version for educational institutions, then it launched a "Premier Edition" for enterprises, which included support and a service level agreement for 99.9% Gmail availability. As Google constantly added features to Google Apps and the numbers of paid customers grew to more than 5 million businesses, the free version became more limited, the number of users dropping from 100 to 50 and then to 10.

Now Google announced that the free version of Google Apps is no longer available for new users. Existing users are not affected by this change and Google Apps for Education continues to be available. Google's explanation for dropping the free Google Apps for small organizations is rather vague: "Businesses quickly outgrow the basic version and want things like 24/7 customer support and larger inboxes. Similarly, consumers often have to wait to get new features while we make them business-ready."

Well, not everyone needed customer support, SLAs, migration tools or other business features and Google Apps was a simple way to create email addresses for your domain and use Gmail to manage them. Why pay $50/user/year for features you don't need?


It's obvious that Google wants to focus on paid customers and the free Google Apps was just another thing to support. Now that Google Apps has more than 5 million business customers, Google no longer needs the free Google Apps to attract new users. The free Google Apps was just a burden that made things more complicated.


Update: Apparently, there's a workaround that lets you use the free version of Google Apps for a single account. "If you create a new Apps account going through the App Engine Admin Console you'll still be able to create a Standard Apps account for free but you'll only be able to get 1 user per account rather than the 10 you get today," says Greg D'Alesandre, Senior Product Manager for Google App Engine.

{ Thanks, Arpit. }

Wednesday, December 5, 2012

Google Now's Research Card

The Google Search app for Android 4.1+ has been updated with new cards for events nearby, boarding passes, walking and biking activity, birthdays.

There's also a new card for research topics. Google tries to find in your search history a list of related queries. If you've been researching a topic, it's likely that you've tried different versions of a query and you've clicked many search results. Google Now shows a card with other useful pages from the same topic. It's interesting to notice that Google can find the name of the topic and shows a page that groups results for various queries. Google also includes a "history" section with pages you've already visited.

For some reason, the pages generated by Google return an error messages if you try to open them using a desktop browser. You need to change the user-agent to open pages with URLs like https://www.google.com/now/topics/t/LONGID.


"The research topics card appears when your recent Web History includes several searches related to a single topic – such as a trip you're planning – and Google detects relevant webpages that you may not have found yet. For this card to appear, you must have Web History turned on for the account you use with Google Now. To explore more links that may be relevant to the topic, touch Explore at the bottom of the card. From the list of links, touch the History tab to view a summary of your recent Web History related to this topic," informs Google.

New Google Now: the perfect travel companion for the holidays

Now Dasher! Now Dancer! Now, Prancer and Vixen! On, Comet! On, Cupid! On, Donner and Blitzen! For Santa’s holiday travel this season, Google Now is just the prescription.

As you head off this holiday season, the latest update to Google Now makes it even more useful for traveling. Before you even leave your house, Google Now will tell you what the weather will be like at your destination (just in time to make sure you remember to pack those mittens). At the airport, your boarding pass is automatically pulled up, helping you breeze through to the gate (launching shortly for United Airlines, with more to come). And once you've arrived at your destination, Google Now can help you uncover some great activities, by showing you events happening around you, suggesting websites for you to explore as you research things to do, or allowing you to learn more about specific pieces while you’re at a museum (using Google Goggles).



All of this builds on top of some of the other cards designed for travel, like the currency conversion, translation, and flight status cards -- hopefully taking a little bit of the stress out of holiday travel so you can focus on family and fun.

We're also making Voice Search even more powerful: you can find out the name of the song that’s playing (“What’s this song?”), quickly find product info (“Scan this barcode”) and post updates to Google+ simply by using just your voice.



These goodies are waiting for you in the updated Google Search app, available on Google Play for devices running Android 4.1, Jelly Bean, or higher.

Posted by Baris Gultekin, Product Management Director

YouTube's App for iPad


Three months after releasing an app for iPhone, YouTube updated it and added an interface optimized for iPad. The lack of a built-in YouTube app for iPad created an opportunity for other developers to come up with their own YouTube apps and some of them are pretty good.


YouTube also updated the app to fill the entire 4-inch display of the iPhone 5 and added AirPlay support. The initial version of the app didn't have AirPlay support and asked users to enable AirPlay mirroring, an inefficient method to play videos on an Apple TV. The new version supports AirPlay, but it uses a non-standard video player and videos stop playing on the Apple TV when you close the app. Another side-effect is that you still can't use the background audio trick that lets you play songs or any other videos while opening another app or after locking the device. Both features are available in Apple's old YouTube app and YouTube's mobile web app.


Obviously, YouTube's app has a lot of features that weren't available in the built-in app: recommendations, unified video history, voice search, closed captions, activity feeds. Unfortunately, the iPad app has a pretty low information density and most sections show fewer videos than Apple's YouTube app. For example, the search feature shows only 4 results at a time in the landscape mode, while Apple's app displayed 12 results. YouTube offers some advanced search options: sorting by date, ratings or view count, finding recent videos and filtering by duration, but the interface tries too hard to be consistent with the desktop interface, while ignoring that a tablet has a small screen. Apple's App Store app from iOS 6 made a similar mistake by showing a small number of results at a time.