Adding new expressions to Blogger templates

Blogger's template engine is powered by a flexible editing language, consisting of a set of Widget Tags which use expressions to conditionally change the output HTML for each post and page on your blog.

Using these expressions, you can customize the HTML output of your blog, to adjust the look and feel. You could, for example, show an image behind the header, but only on the homepage. Or add a flower icon, next to a post's title, if the post has the 'Flower' label.

You can customize your blog's template under Settings > Template > Edit HTML.




Previously, the expressions in Blogger's templates could
  • Add or concatenate values with +
  • Subtract values with -
  • Check for equality with != and ==
  • Compare values with <, >, <= and >=

Now, support has been added for many more expression operators, including:
  • Inversion of true/false values with !/not e.g. <b:if cond='!data:post.allowComments'>...
  • Picking between 2 values with ?: e.g. <a expr:class='data:post.allowComments ? "comments" : "no-comments"' ...
  • Checking if a value is a member of a set or array, with in/contains e.g. <b:if cond='data:blog.pageType in {"index", "archive"}'>...
  • Combining multiple conditions with and/or e.g. <b:if cond='data:blog.pageType == "index" and data:post.allowComments'>...
  • Changing the order of operations with () e.g. <div expr:style='"max-width: " + (data:width + 10) + "px;"'>...

For a full specification of the new operators, see the help article.
Happy Templating!


Posted by Luke Bjerring, Software Engineer

Source: Blogger Buzz


DS features in April

In April, we added the following features to DoubleClick Search (DS):

We also updated the following features:
  • Device preference for ads in a Bing Ads account: You can now use DS to specify a preference for individual ads to display on mobile phones. This preference is available when you create or edit ads from the DS UI or from bulksheets.
    Because the change is coming from Bing Ads, you'll need to sync your engine account with DS before you can set a device preference for individual ads.
  • Executive reports: New Device and Sitelink filters: Filter charts and tables in your executive reports by device or sitelink.
  • New function for inventory templates: ANY(ATTRIBUTE): Depending on how you organize ad groups in an inventory keyword campaign, some ad groups might contain items with different values for the same attribute. For example, one ad group might contain items with different MPNs. If you created a template that used the MPN attribute, DS wouldn't know which MPN value to use and would report an inconsistency error. You can use the ANY(ATTRIBUTE) function to instruct DS to choose a value from one item in the ad group. Like this:  Buy [ANY(MPN)]  Learn more.

See these updates in action in the new features training video for April.


Posted by the DoubleClick Search team

Now live on Android TV: SportsCenter, HBO and more with Sling TV

Android TV brings the best entertainment -- apps, games, movies, shows, music -- to the biggest screen in your home. Today, the Sling TV app adds your favorite dramas, live sports and more.

The NBA Playoffs and SportsCenter on ESPN
Sling TV offers 22 channels for $20 per month so you can catch live sports like The NBA Playoffs on ESPN and highlights on SportsCenter. Best of all, the app is available for phones, tablets and televisions powered by Android. Whether you’re at home or stuck at the office, Android and Sling TV keep you connected to the teams you love.

Ballers℠ premieres on HBO®
Sling TV’s tailored add-on packs also bring more current-season shows and live premieres to Android TV. Add HBO® to your core package for $15 to watch premium content like Game of Thrones® and True Detective®. Ballers℠ premieres at 10pm on June 21 -- catch it live on Sling TV.
Get started with a 50% discount on Nexus Player
Starting today in the United States, you can get the Sling TV app in Google Play on Nexus Player. If you’ve been considering getting Android TV, Sling TV is also offering Nexus Player at a 50% discount when you pre-pay for 3 months of service.

Posted by Thomas Riedl, Android TV Partnerships

Always-on and Wi-Fi with the latest Android Wear update

Posted by Wayne Piekarski, Developer Advocate

A new update to Android Wear is rolling out with lots of new features like always-on apps, Wi-Fi connectivity, media browsing, emoji input, and more. Let’s discuss some of the great new capabilities that are available in this release.

Always-on apps

Above all, a watch should make it easy to tell the time. That's why most Android Wear watches have always-on displays, so you can see the time without having to shake your wrist or lift your arm to wake up the display. In this release, we're making it possible for apps to be always-on as well.

With always-on functionality, your app can display dynamic data on the device, even when the app is in ambient mode. This is useful if your app displays information that is continuously updated. For example, running apps like Endomondo, MapMyRun, and Runtastic use the always-on screen to let you keep track of how long and far you’ve been running. Zillow keeps you posted about the median price of homes nearby when you’re house-hunting.

Always-on functionality is also useful for apps that may not update data very frequently, but present information that’s useful for reference over a longer period of time. For example, Bring! lets you keep your shopping list right on your wrist, and Golfshot gives you accurate distances from tee to pin. If you’re at the airport and making your way to your gate, American Airlines, Delta, and KLM let you keep all of your flight info a glance away on your watch.

Note: the above apps will not display always-on functionality on your watch until you receive the update for the latest version of Android Wear.

Always-on functionality works similar to watch faces, in that the power usage of the display and processor is kept to a minimum by reducing the colors and refresh rate of the display. To implement an always-on Activity, you need to make a few small changes to your app's AndroidManifest.xml, your app’s build.gradle, and the Activity to declare that it supports ambient mode. A code sample and documentation are available to show you how it works. Be sure to tune in to the livestream at Google I/O next week for Android Wear: Your app and the always-on screen.

Wi-Fi connectivity and cloud sync

Many existing Android Wear devices already contain hardware support for Wi-Fi, and this release enables software support for Wi-Fi. The saved Wi-Fi networks on your phone are copied to your watch during setup, and your watch automatically connects to those Wi-Fi networks when it loses Bluetooth connection to your phone. Your watch can then connect to your phone over the Internet, even if they’re not on the same Wi-Fi network.

You should continue to use the Data Layer API for all communications between the watch and phone. By using this standard API, your app will always work, no matter what kind of connectivity the user’s wearable supports. Cloud sync also introduces a new virtual node in the Data Layer called the cloud node, which may be returned in calls to getConnectedNodes(). Learn more in the Multi-wearable support section below.

Multi-wearable support

The release of Google Play services 7.3 now allows support for multiple wearable devices to be paired simultaneously to a single phone or tablet, so you can have a wearable for fitness, and another for dressing up. While DataItems will continue to work in the same way, since they are synchronized to all devices, working with the MessageApi is a little different. When you update your build.gradle to use version 7.3 or higher, getConnectedNodes() from the NodeApi will usually return multiple nodes. There is an extra virtual node added to represent the cloud node used to communicate over Wi-Fi, so all developers need to deal with this situation in their code.

To help simplify finding the right node among many devices, we have added a CapabilityApi, allowing your nodes to announce features they provide, for example downloading images or music. You can also now use the ChannelApi to open up a connection to a specific device to transfer large resources such as images or audio streams, without having to send them to all devices like you would when embedding assets into data items. We have updated our Android Wear samples and documentation to show the best practices in implementing this.

MediaBrowser support

The Android 5.0 release added the ability for apps to browse the media content of another app, via the android.media.browse API. With the latest Android Wear update, if your media playback app supports this API, then you will be able to browse to find the next song directly from your watch. This is the same browse capability used in Android Auto. You implement the API once, and it will work across a variety of platforms. To do so, you just need to allow Android Wear to browse your app in the onGetRoot() method validator. You can also add custom actions to the MediaSession that will appear as controls on the watch. We have a Universal Media Player sample that shows you how to implement this functionality.

Updates to existing devices

The latest version of Android Wear will roll out via an over-the-air (OTA) update to all Android Wear watches over the coming weeks. To take advantage of these new features, you will need to use targetSdkVersion 22 and add the necessary dependencies for always-on support. We have also expanded the collection of emulators available via the SDK Manager, to simulate the experience on all the currently available devices, resolutions, and shapes, including insets like the Moto 360.

In this update, we have also disabled support for apps that use the unofficial, activity-based approach for displaying watch faces, as announced in December. These watch faces will no longer work and should be updated to use the new watch face API.

Since the launch of Android Wear last summer, Android Wear has grown into a platform that gives users many possibilities to personalize their watches, with a variety of shapes and styles, a range of watch bands, and thousands of apps and watch faces. Features such as always-on apps and Wi-Fi allow developers even more flexibility to give users amazing experiences with Android Wear.

Golf Channel’s GolfNow app helps golfers find their course using Google Maps APIs



Editor’s note: Today’s guest blogger is Robert Maretsky, Director of Mobile for GolfNowGolf Channel. Read how the GolfNow app uses Google Maps APIs to help golfers find the right course and improve their scores.

It can be easier for golfers to get a hole in one than to find the right golf course. That’s what led us to create the GolfNow app (available for Android), which helps golfers find and make reservations at courses, and improve their games by showing satellite views of courses as they play. The app is a spinoff of our GolfNow website. The app shows golfers their exact location on the course and the distance between their location and the cup by collecting routing information from a third party and overlaying it on top of Google Maps Satellite view.
We chose the Google Maps APIs because of the comprehensive coverage, timely updates and easy integration with our Android app. We use Google Maps to provide course details so that golfers can find the course that’s right for them. When on the course, to help golfers decide how to best play their next shot, we use the APIs to display satellite images from Google Maps and use a phone’s GPS to show golfers where they are on the course.
The Places API has been particularly useful for helping people search for golf courses based on location. If you know you’re going to have free time when visiting (for example) Universal Studios in Orlando, you can type 'Universal Studios' in the search bar and discover nearby courses. Results display course information, including reviews and star ratings from GolfAdvisor.com. We use custom layouts in our infowindows to style and display the data from the Places API.
GolfNow website is the largest provider of tee times in the world, with more than 13 million rounds and counting. Now, thanks to apps powered by Google Maps APIs, we’re making it even easier for golfers to get the most out of their favorite sport — helping them find and book tee times, playing golf with accurate GPS information, and reviewing how they did after the round is complete.

The limited-edition Skrillex Live Case: Built for fans. Made for Android.

We spend a lot of time with our phones every day. They’re essential to how we communicate and for many users, an extension of our style. We think that means your phone — and its accessories — deserve to be as interesting as you are. So we decided to seek out some of the world’s top artists to make that happen.

Enter Editions, a series of creative collaborations to develop limited-edition cases for Android phones. We are kicking off the series with Grammy-winning producer, Skrillex, who has created three unique designs inspired by his lifelong fascination with space. The Skrillex Live Case connects to your phone to bring you VIP access to Skrillex content and a companion live wallpaper that extends its design onto the screen.
From Skrillex’s satellite to your screen

The companion live wallpaper updates over the course of the day showing stunning images of Earth shot from the stratosphere. At night, it changes to display constellations visible from your current location.

To capture the Earth images, Google and Skrillex launched a custom-designed balloon satellite named after Skrillex’s dog, Nanou. Once Nanou’s photographic mission is complete, a lucky fan will win the autographed satellite in an upcoming giveaway. Follow @Android on Twitter for more details.
In a short documentary about the project, we join Skrillex in Downtown LA to hear him talk for the first time about the origins of his fascination with space. We also travel deep into the Nevada desert to launch his satellite into the stratosphere.

VIP access to Skrillex content

Fans who get the Live Case will get early access to a free OWSLA album from Google Play and Skrillex updates sent directly to their phones. A shortcut button built-in on the Live Case gives you one-touch access to Skrillex’s music feed on YouTube. The button can also be customized to open your favorite apps, launch your phone camera or go to Skrillex’s website.

Exclusively on the Google Store

The limited-edition Skrillex Live Case is individually numbered and available for Nexus 5, Nexus 6, Samsung Galaxy S5, Samsung Galaxy S6 and Samsung Galaxy Note 4. Get yours at the Google Store today through the end of June while supplies last. Stay tuned for the next collaboration. We can’t wait to tell you all about it.

Posted by Kari Clark, Senior Manager, Google Accessories

Android Developer Story: Wooga’s fast iterations on Android and Google Play

Posted by Leticia Lago, Google Play team

In order to make the best possible games, Wooga works on roughly 40 concepts and prototypes per year, out of which 10 go into production, around seven soft launch, and only two make it to global launch. It’s what they call “the hit filter." For their latest title, Agent Alice, they follow up with new episodes every week to maintain player interest and engagement over time.

The ability to quickly iterate both live and under development games is therefore key to Wooga’s business model — Android and Google Play provide them the tools they need and mean that new features and updates are made on Android first, before they get to other platforms.

Find out more from Sebastian Kriese, Head of Partnerships, and Pal Tamas Feher, Head of Engineering, and learn how the iteration features of Android and Google Play have contributed to successes such as Diamond Dash, Jelly Splash, and Agent Alice.

You can find out more about building successful games businesses on Android and Google Play at Google I/O 2015: in person, on the live stream, or session recordings after the event. Check out the following:

  • Developers connecting the world through Google Play - Hear how the new mobile ecosystem including Google Play and Android are empowering developers to make good on the dream of connecting the world through technology to improve people's lives. This session will be live streamed.
  • Growing games with Google — In addition to consoles, PC, and browser gaming, as well as phone and tablet games, there are emerging fields including virtual reality and mobile games in the living room. This talk covers how Google is helping developers across this broad range of platforms. This session will be live streamed.
  • What’s new in the Google Play Developer Console - Google Play’s new launches will help you acquire more users and improve the quality of your app. Hear an overview of the latest features and how you can start taking advantage of them in the Developer Console.
  • Smarter approaches to app testing — Hear about the new ways Google can help maximize the success of your next app launch with cheaper and easier testing strategies.

GameStop launches a monster hunt to promote The Witcher 3: Wild Hunt with Google Maps APIs



Editor’s note: Today’s guest blogger is Tom Edwards from the marketing and promotions agency The Marketing Arm. Read how The Marketing Arm used Google Maps APIs to build a website for GameStop to promote the launch of a new game.

If you’re going on a monster hunt, it’s a good idea to bring a map. And if you want to build buzz around the release of a new game, you should have the right tool as well—in our case it was Google Maps APIs. We built a website for GameStop to promote the launch of The Witcher 3: Wild Hunt, an action role-playing game from Warner Brothers and CD Projekt RED. After a visitor logs into the promotional website she is dropped into a map of the world and collects clues about where to find monsters. The goal is to be the first person to find each monster and win a prize.

The game’s launch deadline required us to build the site within a tight timeframe. We chose Google Maps APIs because they provided the tools we needed to build our maps quickly and easily. They also let us focus on the site creative rather than get bogged down with technical issues. We use the Google Maps JavaScript API for the front end, to start the experience and immerse visitors into the virtual world. Then, with the Google Maps Street View Service we allow users to search for monsters. We took images of the monsters and used overlays to drop them into familiar surroundings.

We use the Street View API to plant the user in a random location somewhere in the world, then visualize their surroundings, including monsters and trails of blood. We set a randomly generated starting point to the map based on five predefined locations. From there we have event listeners in place for 'mapView: bounds_changed, streetView: visible_changed, streetView: position_changed, streetView: pov_changed, searchBox: places_changed'.

When the user has initialized Street View, we make a call to our API to see if any monsters are within a defined distance from the LatLng of our monster data set. We continue this test anytime the position_changed event is fired until a monster is within range. At that point we update the class of a div that sits above the map view. Each monster is assigned a specific css class which allows us to easily make tweaks.

Google Maps made it easy to combine the real world of Street View with imaginary creatures from the game. Our goal went beyond just our users having fun — we wanted to build a site that would create genuine excitement around the game and give people a taste of monster hunting in the real world.

How the Cloud is Transforming TV Across All Screens

This post is part of DoubleClick's Evolution of TV series. In this series we identify the risks and opportunities around 7 dynamics transforming the advertising landscape as TV programming shifts to delivery over the Internet.

Recently, at the National Association for Broadcasters (NAB) Show in Las Vegas, we released the fourth installment of our Evolution of TV series where we explore the impact of the cloud on TV's transformation. The premise of this new whitepaper is that everything we know about TV delivery and viewing is about to change.


Everything from the way we watch TV to how it's distributed is changing. The delivery and production of the TV content we're viewing—and sometimes binge-watching on so many screens—is on the cusp of industry-wide innovation as TV delivery shifts from over the air, satellite, or cable to the internet. To support TV programming over the internet, those responsible for delivering the content—the programmers and distributors—are beginning to migrate their operations to a more flexible, agile environment: the cloud


In this new whitepaper we explore a few of the cloud migrations happening in specific areas of the TV business like:
  • Subscription services
  • Transcoding and encoding
  • Broadcast automation
  • Stream packaging
  • Signal distribution between partners
  • Signal acquisition between partners
  • Storage and archiving


In short, migrating TV to the cloud not only affords programmers and distributors cost savings and efficiency but also enables innovation that could change TV as we know it today into a far more dynamic, personalized, and addressable medium.


Download the PDF to get the entire scoop on how parallel transformations in other industries show us that the cloud will encourage innovation and necessitate agility for programmers and distributors, as well as create a vastly different viewing experience for users.




Anish Kattukaran,
Product Marketing, DoubleClick Video & Brand Measurement

How the Cloud is Transforming TV Across All Screens

This post is part of DoubleClick's Evolution of TV series. In this series we identify the risks and opportunities around 7 dynamics transforming the advertising landscape as TV programming shifts to delivery over the Internet.

Recently, at the National Association for Broadcasters (NAB) Show in Las Vegas, we released the fourth installment of our Evolution of TV series where we explore the impact of the cloud on TV's transformation. The premise of this new whitepaper is that everything we know about TV delivery and viewing is about to change.


Everything from the way we watch TV to how it's distributed is changing. The delivery and production of the TV content we're viewing—and sometimes binge-watching on so many screens—is on the cusp of industry-wide innovation as TV delivery shifts from over the air, satellite, or cable to the internet. To support TV programming over the internet, those responsible for delivering the content—the programmers and distributors—are beginning to migrate their operations to a more flexible, agile environment: the cloud


In short, migrating TV to the cloud not only affords programmers and distributors cost savings and efficiency but also enables innovation that could change TV as we know it today into a far more dynamic, personalized, and addressable medium.


Download the PDF to get the entire scoop on how parallel transformations in other industries show us that the cloud will encourage innovation and necessitate agility for programmers and distributors, as well as create a vastly different viewing experience for users.




Anish Kattukaran,

Product Marketing, DoubleClick Video & Brand Measurement