Author Archives: Gary Lewis

Google Cloud Messaging: State of the Union

Posted by Laurence Moroney, Developer Advocate

Google Cloud Messaging (GCM) is an infrastructure that allows you to do simple and reliable messaging to distribute your messages to and across many devices.

Every day, GCM delivers over 150 Billion messages to devices on various platforms including Android Devices, iOS Devices and Web Browsers. It has a number of different techniques for sending messages:

Single devices. Each device has a unique registration token. If you want to reach that device -- for example using GCM to build a 1:1 chat application, you can do so, addressing it via that token.

Device Groups allow you to bundle devices together into a group. For example, one of your users might have multiple devices -- including the very common scenario of having both a phone and a tablet. Using Device Groups in GCM, you can send a message to all of her devices, and if you desire, you can implement your app so that dismissing on one dismisses on all.

Topics allow you to create interest groups for your users. Once they subscribe to a topic, you can send messages to that topic, and your users will receive them. There’s no subscription limit to these, so you don’t have to worry about how many users subscribe to your topics! Some great scenarios of topics being used to improve user experience can be found in this blog post.

When it comes to reliability of messages, an internal study at Google found that the majority of notification messages (95th percentile) are delivered within 250ms to connected devices. Connectivity is impacted by many factors -- including carriers, routers and local connectivity. Indeed, in some locales it is common for people to disable mobile data for large parts of the day in order to save on bandwidth costs. In this scenario, users will still receive their notifications once they re-activate their data connection.

We’ve provided a number of resources to help you to build apps using GCM. Check out this talk where you are taken step by step through building an Android app and an associated server in PHP. There’s also an open source ‘GCM Playground’ on GitHub here, which provides a sample server implementation that runs on the Google Cloud Platform!

If you want to reach iOS users, today we’re adding an API that will help you to migrate your existing infrastructure to send notifications to iOS device, with no client code changes required. With the new batch Import API you can import the APNs device tokens that you collected from your iOS audience into GCM, and immediately start sending notifications through GCM. After you import the APNs device tokens, you can also use the InstanceID API to transparently subscribe users to GCM topics, achieving efficient fan-out of notifications based on interest groups, once again with no changes required on client code.

We’re continuing to build and innovate on this platform -- stay tuned for lots of cool new features coming soon!

You can learn more about Google Cloud Messaging on the Developers site here, including quickstarts for Android and iOS!

Bringing Museu Nacional d’Art de Catalunya to Life

Posted by Larry Yang, Senior Product Manager, Project Tango

Ever been lost indoors? Us too. All the time. We brought Project Tango to Mobile World Congress, and instead of just talking about augmented reality and indoor navigation, we let attendees experience these technologies for themselves... in a museum.

Most of us love museums, but they can be difficult to navigate. It can be hard to find the location of a painting, the story of the sculpture—and equally hard to tell your friends where you are. With Project Tango, the way we experience museums can completely change by making it easier to find what (and who) you’re seeking as well as showing you the story behind the art.

To demonstrate this, we invited conference attendees into the Museu Nacional d'Art de Catalunya, carrying Project Tango developer kits loaded with GuidiGO, a museum tour app, and Glympse, a location-sharing app.

With GuidiGO, attendees could view the museum’s floor plan and follow blue dots on their screens to navigate to specific pieces of art — all without relying on Wi-Fi, GPS or beacons. They could also learn more about the art by simply holding the tablet up to each work and tapping virtual tags to reveal additional information. If people lost track of their friends during their visit, they could easily share their indoor location with their friends with the Glympse app.


We loved seeing these creative applications of Project Tango and can’t wait for people to get their hands on them with the launch of Lenovo’s consumer-ready Project Tango smartphone this summer. To make your own Project Tango app, take a look at our developer documentation and stay tuned for more Project Tango news and applications.

Coffee with Identity Platform Product Manager Steven Soneff

Posted by Laurence Moroney, Developer Advocate

Coffee with a Googler catches up with Steven Soneff, Product Manager for the Google Identity Platform to talk about Smart Lock for Passwords. If you’re not familiar with it, this is a terrific technology that takes the hassle out of signing in across devices to your favorite apps and websites. Smart Lock can save passwords to your Google account, and then help you use your passwords securely and conveniently on the websites you use in Chrome and the apps you use in your Android devices.

Steven demonstrates use of Smart Lock with Netflix, where at home he may sign in with the browser on his desktop, but over coffee he signs in using his smartphone. We discuss the great blog post that Steven wrote about Smart Lock, showing how it works, and how you can code your Android applications to use it. To learn more about the Google Identity Platform, check out the developers site here.

Google’s Launchpad Accelerator successfully takes off. Apply to join the June class.

Originally posted on Android Developers Blog

Posted by Roy Glasberg Global Lead, Launchpad Program & Accelerator

Last month, 24 promising startups from India, Indonesia, and Brazil came to Silicon Valley to participate in Google’s Launchpad Accelerator, a new program that provides late-stage startups (mobile apps) with mentoring and resources to successfully scale in their local economies.

During the intensive two-week Accelerator kickoff in our Mountain View headquarters, Google engineers from 11 product areas, as well as experts from other companies, were on hand to provide startups with mentorship on how to scale and monetize their apps, and ultimately, build successful businesses. Now back in their home countries, the teams will continue developing their products with the support of up to $50,000 in equity-free funding, six more months of ongoing mentorship, and a breadth of developer tools from the Launchpad Accelerator program.

So far, many startup participants have already seen an immediate impact. Two weeks after attending the kickoff event, Brazilian mobile game developer UpBeat Games was featured on Google Play and saw a 1,000% increase in app installations in Asia, as well as a 200% overall increase in active users, by leveraging analytics to better understand their users.

According to UpBeat Games founder Vinicius Heimbeck, “By working one-on-one with the mentors, we learned that we needed to be a data-driven company. We now have the right analytics tools to measure the results of our efforts and to learn from them to optimize the user experience. This all directly impacted our huge success once we were featured on Google Play.”

eFishery, an Indonesian startup that produces smart automated fish feeders, turned its focus on scaling since attending Launchpad Accelerator. “The mentors gave us great insight about how to build a scalable product and how to engage billions of users,” said co-founder and CEO Gibran Chuzaefah Amsi El Farizy. “We received both technical and practical advice on our business, from building back-end technology to embracing failure with the right mindset.”

Apply now for Launchpad AcceleratorWe are also excited to announce the second class for Launchpad Accelerator which will begin in June 2016.

If you are a startup from India, Indonesia, Brazil, or Mexico (a new addition!) and are interested in participating in the next wave, we encourage you to apply here by March 31. We expect to continue adding more countries to the program in the future, so be on the lookout!

A chat about Firebase over Coffee with Googler David East

Posted by Laurence Moroney, Developer Advocate

Coffee with a Googler caught up with David East to talk about Firebase and what’s been happening over the last few months with this platform. In this interview, David tells Laurence Moroney all about what he calls ‘The Holy Grail of Development’ -- a platform that makes building mobile backends really easy and quick.

David also talks about how Google has invested a lot of resources into Firebase to make it even better and more useful, such as providing tools for Unity3d developers to take advantage of the real time database features.

Elsewhere, David walks through the steps on how to get started with Firebase to power your app’s backend, including data storage, user authentication, static hosting and more at Firebase.com.

App Monetization Insights: How Poki cleverly tests their games before launching

Originally posted on Inside AdMob

Posted by Joe Salisbury, Product Specialist, AdMob

This is the 2nd post of our 5-part blog series providing monetization tips straight from successful app developers. If you’re exploring the question, “what’s the best way to monetize my app?”, also check out AdMob’s free No-nonsense Guide to App Monetization.

This week, we meet with Sebastiaan Moeys, co-founder of Poki, a cross-platform game publisher. They develop and publish web and app games for kids of all ages, reaching 30 million monthly active users. Originally Poki, operated exclusively on the web, but with the rise of mobile they’ve recently released their first app called Zoi. Zoi has over 500,000 downloads and a 4.4 rating across the app stores. Check out these tips from Sebastiaan.



1. Start simply when first approaching in-app analytics
Sebastiaan’s team is sophisticated with their in-app analytics platform and use this data to drive all of their decision making.

For context, Poki continually monitors three things. First, they measure a custom metric called ‘Pure Game Time’. This metric tracks how much time a player spends in-app excluding everything that isn’t actually game time (i.e. subtracting time the users engage with ads or time waiting for the game to load). Second, they monitor 1st, 3rd and 7th day retention rates, benchmarking their game’s performance with top performers in the market. And lastly, they measure drop-off rate. 

Sebastiaan clearly advocates for building out a robust analytics setup over time, but he believes it's important to start off simply:

“You should start simple. In-app analytics can be extensive and you can’t figure out everything in one night. The key is to take small steps, make sure you really understand all the metrics you’re looking at and iterate. It’s a mindset.”

Consider choosing a single, meaningful metric to start, potentially drop-off rate. Then, begin to get in the routine of using that data to improve your app’s quality. 



2. Test your assumptions cheaply and quickly before investing in major developments
Globally, game players have embraced multi-screen options, simultaneously playing on lots of different platforms. For Poki, this meant transitioning their web-based development company to include mobile development. Although exciting, the new challenge brought a new problem. 
Now every time they wanted to launch a new game, it would require a larger team and more money upfront. Every project became a bigger gamble.

To solve this, Poki uses a clever approach that has worked really well for them. Instead of launching on every platform, all at once, they use the web to launch softly, test and iterate. Once they feel comfortable with the new release, then they develop for mobile. The insights they learn from web helps them test a lot of decisions that need to be made for the business.

“By developing games in a smart, iterative way, we not only had the time to ensure that players loved it, we were able to channel the momentum and insights into further growing our user base. With our web learnings, we’re able to perfect game play, quickly A/B test the best places to show ads in our app version, learn what global regions we should localize our app for, and even ask our existing users to help spread the word about the future app launch.”

The process has worked so well with Zoi, that they’ve already begun to scale. The company now has 3 new games in development, and is collecting data to help improve their chances of being a success on mobile. Sebastiaan thinks that the approach of testing quickly and cheaply before launching is something that other game developers can replicate as well. He explains, “for new game developers, try to test your assumptions as early as possible – test your prototype quickly, get your game design and monetization right, and then release your app.” 

Google Ventures, Google’s investment firm, also believes in testing ideas before spending on development. To help more companies do this, they’ve created an approach called a Design Sprint, “a five-day process for answering critical business questions through design, prototyping, and testing ideas with customers.” Learn more about Google Venture’s approach to inexpensive prototyping here.



3. Look outside your home country for opportunities
Sebastiaan started what is now Poki when he was still in high school in Holland. A popular trend he loved was web-based games. All of his friends played them and he knew it was popular all over the country. When on a family vacation in France, he was amazed to find out that the trend hadn’t become popular there yet. Once he got home, he coded up a site and translated everything into French using his parent’s dictionary. The rest is history. Now Poki has 29 dedicated translators, helping the team bring more games to more regions of the world.

Sebastiaan uses the same principle to find the best markets to promote new games in. Additionally, he loves using AdMob to monetize internationally, because it’s easy and quick to get started. His advice for developers looking to go global:

“Work with Google to begin with, and keep your ad implementation simple. Once you start growing in a certain market, look for partners that have local expertise in that market, and use Google’s tools to run localized ads in concurrence with ad demand in the Google network. We have taken this approach in many markets, and the payoff was great for us.”

If you found these tips helpful, don’t forget to check out The No-nonsense Guide to App Monetization. Also, stay connected on all things AdMob by following our Twitter and Google+ pages and don’t forget to check out Poki on Twitter.




Introducing Autotrack for analytics.js

Posted by Philip Walton, Developer Programs Engineer


The web has changed a lot since the early days of Google Analytics. Back then, most websites actually consisted of individual pages, and moving from one page to the next involved clicking a link and making a full-page request. With sites like this, it's possible to track the majority of relevant user interactions with a single, one-size-fits-all JavaScript tracking snippet.

But the web of today is much more complex and varied than it used to be. In addition to traditional, static websites, we have full-featured web applications. User interactions aren't limited to clicking links and submitting forms, and a "pageview" doesn't always mean a full-page load.

The web has changed, but analytics implementations have stayed pretty much the same. Most Google Analytics users copy and paste the default tracking snippet and that's it. They know there's more they can do with Google Analytics, but taking the time to learn is often not a priority.

Autotrack for analytics.js is a new solution to this problem. It attempts to leverage as many Google Analytics features as possible while requiring minimal manual implementation. It gives developers a foundation for tracking data relevant to today's modern web.

Features

The autotrack library is built as a collection of analytics.js plugins, making it easy to use the entire library as-is or to pick and choose just the plugins you need. The next few sections describe some of the features autotrack enables.

Outbound link and form tracking

When a user clicks a link that points to another page on a site, that other page typically sends a pageview hit once the user arrives. Because there's a series of pageviews, Google Analytics can figure out on the back end where the user navigated to (and from). But if a user clicks a link or submits a form to an external domain, that action is not captured unless you specifically tell Google Analytics what happened.

Historically, outbound link and form tracking has been tricky to implement because most browsers stop executing JavaScript on the current page once a new page starts to load. Autotrack handles these complications for you, so you get outbound link and form tracking for free.

URL change tracking for single page applications

If you're building a single page application that dynamically loads content and updates the URL using the History API, the default tracking snippet will not suffice -- it only tracks the initial page load. Even if you're sending additional pageviews after successfully loading new content, there can still be complications.

Autotrack automatically detects URL changes made via the History API and tracks those as pageviews. It also keeps the tracker in sync with the updated URL so all subsequent hits (events, social interactions, etc.) are associated with the correct URL.

Declarative event tracking

Sometimes it's easier to declaratively add an event to the HTML than to manually write an event listener in JavaScript. Tracking simple click events is a prime example of this. To track click events with autotrack, you just add data attributes to your markup.

 <button data-event-category="Video" data-event-action="play">Play</button>  

When a user clicks on the above button, an event with the corresponding category and action (and, optionally, label and value) is sent to Google Analytics.

Media query tracking

Most sites today use responsive design to update the page layout based on the screen size or capabilities of the user's device. If media queries are used to alter the look or functionality of a page, it's important to capture that information to better understand how usage differs when different media queries are active.

Autotrack allows you to register the set of media query values you're using, and those values are automatically tracked via custom dimensions. It also tracks when those values change. (Note that media query tracking requires you to set up custom dimensions in Google Analytics. The process only takes a few minutes, and the instructions are explained in the mediaQueryTracker plugin documentation.)

These are just a few of the features you can enable when using Autotrack. For a complete list of all plugins and instructions on how to use them, refer to the Autotrack documentation on Github.

Who should use autotrack?

While anyone could use and benefit from autotrack, the library is primarily geared toward sites that do not customize their current analytics implementation and would like to take advantage of the features described in this article.

If you're just using the default tracking snippet today, you should consider using autotrack. If you already have a custom implementation of Google Analytics, you should first check the documentation to make sure none of the autotrack features will conflict and no data will be double-counted.

Next steps

To get started using autotrack, check out the usage section of the documentation. If you're curious to see what the data captured by autotrack looks like, the Google Analytics Demos & Tools site uses autotrack and has a page with charts showing the site's own Google Analytics data.

If you want to go deeper, the autotrack library is open source and can be a great learning resource. Have a read through the plugin source code to get a better understanding of how many of the advanced analytics.js features work.

Lastly, if you have feedback or suggestions, please let us know. You can report bugs or submit any issues on Github.

EarlGrey – iOS Functional UI Testing Framework

Posted by Siddartha Janga, Google iOS Developers

Brewing for quite some time, we are excited to announce EarlGrey, a functional UI testing framework for iOS. Several Google apps like YouTube, Google Calendar, Google Photos, Google Translate, Google Play Music and many more have successfully adopted the framework for their functional testing needs.

The key features offered by EarlGrey include:

  • Powerful built-in synchronization : Tests will automatically wait for events such as animations, network requests, etc. before interacting with the UI. This will result in tests that are easier to write (no sleeps or waits) and simple to maintain (straight up procedural description of test steps).
  • Visibility checking : All interactions occur on elements that users can see. For example, attempting to tap a button that is behind an image will lead to test failure immediately.
  • Flexible design : The components that determine element selection, interaction, assertion and synchronization have been designed to be extensible.

Are you in need for a cup of refreshing EarlGrey? EarlGrey has been open sourced under the Apache license. Check out the getting started guide and add EarlGrey to your project using CocoaPods or manually add it to your Xcode project file.

Announcing the People API

Originally posted on Android Developers blog
Posted by Laurence Moroney, Developer Advocate

We’re delighted to announce the availability of the People API. With it, you can retrieve data about an authenticated user’s connections from their Contacts. Previously, developers had to make multiple calls to the Google+ API for user profiles and the Contacts API for contacts. The new People API uses the newest protocols and technologies and will eventually replace the Contacts API which uses the GData protocol.

For example, if your user has contacts in her private contact list, a call to the API (if she provides consent to do so) will retrieve a list containing the contacts merged with any linked profiles. If the user grants the relevant scopes, the results are returned as a people.connections.list object. Each person object in this list will have a resourceName property, which can be used to get additional data about that person with a call to people.get.

The API is built on HTTP and JSON, so any standard HTTP client can send requests to it and parse the response. However, applications need to be authorized to access the APIs so you will need to create a project on the Google Developers Console in order to get the credentials you need to access the service. All the steps to do so are here. If you’re new to the Google APIs and/or the Developers Console, check out this first in a series of videos to help you get up-to-speed.

Once you’re connected and authorized, you can then get the user’s connections like this (using the Google APIs Client Library for Java):


 ListConnectionsResponse response =   
peopleService.people().connections().list("people/me").execute();
List<Person> connections = response.getConnections();

Full documentation on the people.connections.list method is available here.

The list of connections will have details on all the user’s social connections if the required scopes have been granted. Contacts will only be returned if the user granted a contacts scope.

Each Person item will have a resource_name associated with it, so additional data for that person will be accessible via a simple call:

Person person = peopleService.people().get("resourceName").execute();

Details on this API call can be found here.

In addition to merging data from multiple sources and APIs into a single cohesive data source, the new People API also exposes additional data that was not possible to get before, such as private addresses, phone numbers, e-mails, and birthdays for a user who has given permission.

We hope that these new features and data along with simplified access to existing data inspires you to create the next generation of cool web and mobile apps that delight your users and those in their circles of influence. To learn more about the People API, check out the official documentation here.

App Monetization Insights: How Hydro Coach rapidly reached 22 new markets

We created The No-nonsense Guide to App Monetization to help you answer a burning question, “What’s the best way to monetize my app?”. Our new 5-part blog series provides additional tips straight from successful app developers.

Hydro CoachThis week, meet Christoph Pferschy, the app developer and designer behind Hydro Coach. Hydro Coach is a drink reminder and water intake tracker that’s been growing in popularity, now receiving over 5,500 downloads a day. Check out these tips from Christoph.

1. Start small to get big


Christoph is best known for his app Hydro Coach, but his company, Codium App Ideas, has a bigger vision. In his words, they’re on a mission “to create useful and high-quality health-related apps that are combinable to a single health & fitness system.”

But right now, Christoph is focusing on just one app – Hydro Coach. Why?

Because he believes the best way to accomplish a big goal is to focus on a critical piece and nail it. He chose Hydro Coach because he’s personally benefited from drinking more water and he saw that there was less competition in the space.

Now that his business is growing, he’s begun moving forward with his larger plan, connecting with other services and platforms. For example, he explains, “we’ve connected Hydro Coach to Google Fit to synchronize users’ weight and we’re also very proud to be featured as a partner app with Samsung’s S Health,” syncing all drink inputs with their platform.”

Consider Christoph’s approach to building a company: start small to get big. Focusing on too much, too early, might not allow you to build an app experience that user’s love.

2. Assess users’ needs before choosing a business model


Settle on a business model for your app before it launches. Spend time assessing your users’ needs and your business goals to get there. Start by asking yourself guiding questions that will help narrow down the decision for you like, “Who is your audience?”, “What value does your app provide?”, and “How do you intend to promote your app?”. Learn more about these guiding questions and business models in our No-nonsense Guide to App Monetization.

Once you do choose your business model, consider continually improving your app’s user experience, especially when it affects monetization. Christoph is meticulous about providing the best experience for all of his users, explaining,

“We try to improve each user experiment segment with small and careful changes over time. For example, we’ve fine-tuned the algorithm that determines when, how and how often ads are displayed, thanks to Manuela (our AdMob consultant). We also invest in small things that mean a lot to our users, like being sure to say ‘Thank you’ after a user makes an in-app purchase and making the flow after a purchase as smooth as possible. It all adds up.”

As you look through your app, be methodical when choosing your overarching monetization strategy. Once you’ve chosen your model, focus on tweaking the user experience and providing the best possible monetization flow.

3. Consider having your users help with localization


Christoph has done an amazing job getting Hydro Coach fully translated into 22 languages. His secret weapon? His users.

As he explains, “It’s no secret that translating the app is the first and most important step. So here’s my tip: ask your users to help translate. It results in a high-quality translation because people who are already using your app have the needed context and interest. There are several services for this that you can use, but you’ll be surprised how many people love to help.”

If you found these tips helpful, don’t forget to check out The No-nonsense Guide to App Monetization. Also, stay connected on all things AdMob by following our Twitter and Google+ pages.

Posted by Joe Salisbury, Product Specialist, AdMob