Category Archives: Android Developers Blog

An Open Handset Alliance Project

Android Developer Story: Hole19 improves user retention with Android Wear

Posted by Lily Sheringham, Google Play team

Based in Lisbon, Portugal, Hole19 is a golfing app which assists golfers before, during, and after their golfing journey with GPS and a digital scorecard. The app connects the golfing community with shared statistics for performance and golf courses, and now has close to 1 million users across all platforms.

Watch Anthony Douglas, Founder & CEO, and Fábio Carballo, Head Android Developer, explain how Hole19 doubled its number of Android Wear users in 6 months, and improved user engagement and retention on the platform. Also, hear how they are using APIs and the latest Wear 2.0 features to connect users to their golfing data and improve the user experience.


Learn more how to get started with Android Wear and get the Playbook for Developers app to stay up-to-date with more features and best practices that will help you grow a successful business on Google Play.

Expand Your Global Reach on Google Play With New Language and Country Analytics

Posted by Rahim Nathwani Product Manager, App Translation Service

With users in 190 countries around the world, Google Play offers you a truly global audience for your apps and games. Localization is one of the most powerful ways to connect with people in different places, which is why we launched translation support for in-app purchase and Universal App Campaigns earlier this year. With over 30 language translation options available via the Developer Console, we updated our app translation service to help you select the most relevant languages, making it quick and easy to get started.

With the launch of new language and country analytics, you gain access to app install analysis on Google Play, including:

  • Information on the top languages and countries where apps have been installed, broken down to the level of your app’s category
  • The percentage of installs that come from users of those languages
  • Further information to help inform your go-to-market plans for these countries

To make ordering translations easier, we show language bundles that you can add to your order in a single click.

To get started, select Manage translations -> Purchase translations from the Store Listing page in the Google Play Developer Console.

5 Tips to help you improve game-as-a-service monetization

Posted by Moonlit Wang, Partner Development Manager at Google Play Games, & Tammy Levy, Director of Product for Mobile at Kongregate

In today’s world of game-as-a-service on mobile, the lifetime value of a player is a lot more complex, where revenue is now the sum of many micro transactions instead of a single purchase with traditional console games.

Of course you don’t need a sophisticated statistical model to understand that the more time a player invests in your game, and the more money they spend, the greater their LTV. But how can you design and improve monetization as a mobile game developer? Here are 5 tips to help you improve game-as-a-service monetization, with best practice examples from mobile games publisher, Kongregate:

1. Track player behavior metrics that have a strong and positive correlation with LTV

  • D1, D7, D30 retention indicates how well a casual player can be converted into a committed fan.
  • Session length and frequency measures user engagement and how fun your game is.
  • Completion rate at important milestones can measure and pinpoint churn.
  • Buyer and repeated buyer conversion, represents your most valuable user segment.

2. Optimize for long-term engagement and delight your best players

Retention is the first metric that can distinguish great games from mediocre ones. Games with higher retention rates throughout the user’ lifecycle, monetize better consistently. Retention is king, and more importantly, long-term retention should be prioritized. Therefore, when designing your game, aim to create a sophisticated and engaging experience to delight your most committed fans.

[This chart shows the retention of top games / apps over time]
  • When considering long term retention, focus on achieving a strong D30, but also look beyond the first 30 days. Measure long term retention by assessing the following rates: D30 to D60, D30 to D90, and D30 to D180. The higher the rate, the stickier your game is in the long term, which will increase your LTV.
  • Players are willing to pay a fixed amount of money per hour of “fun”, so think about updates when designing your game, to make the content rich and fun for those who will play at very high levels and spend the most time within your game, don’t gate your players or hinder their in-game progression.
  • Use the Google Play Games Services - Funnel Report to help you track different milestone completion rates in your games, so you can identify drop off points and reduce churn
.
3. Increase buyer conversion through targeted offers

First-time buyer conversion is the most important as player churn rate drops significantly after the first purchase, but stays relatively flat regardless of the amount spent. Also, past purchase behavior is the best predictor of future purchases. Find your first-time and repeated buyer conversion rate directly in the Developer Console.

  • Use A/B testing to find the price that will maximize your total revenue. Different people have different willingness to pay for a given product and the tradeoff between price and quantity is different for different products, so don’t decrease prices blindly.
  • Tailor your in-game experience as well as in-app purchase offers based on the player’s predicted probability to spend using the Player Stats API, which predicts players churn and spend.

For example, in Kongregate’s game Spellstone, testing two pricing points for a promotion called Shard Bot, which provides players with a daily “drip” of Shards (the premium currency) for 30 days, showed players had a much stronger preference for the higher priced pack. The first pack, Shard Bot, priced at $4, granted players 5 daily shards, and the second pack, the Super Shard Bot, was priced at $8 and granted players 10 daily shards.

[Two week test results showing preference for the more expensive pack, which also generated more revenue]

Kongregate decided to keep the higher priced Super Shard Bot in the store, although both packs resulted in very similar retention rates:

4. As well as what monetization features to implement, take into consideration why, when and how to do so

  • Why: “Buyer intent” is most important. Any item with a price tag should serve to enhance your players in-game experience. For example, a new map, a new power, something exciting and additional to the free experience. Don’t gate your players with a purchase-only item as happy users means more time spent with your game, which will lead to higher revenue. Educate users by gifting some free premium goods and currency during the tutorial, and let users experience the benefit first.
  • When: Time offers based on when users may need it. If your IAP is to continue gameplay after timeout, then you should surface it right when the timer ends. If your IAP is to offer premium equipment, then you should surface it when users gear up their characters. The offer should be contextually relevant, such that the content should cater to the player’s current status and needs in-game.

    In particular, Starter Packs or New Buyer Promos need to be well timed. Players need to understand the value and importance of all the items before they are shown the promotion. If surfaced too early, players will not feel compelled to purchase. If surfaced too late, the offer will not be compelling enough. The Starter Pack should appear within 3 to 5 sessions since install, depending on your game. Additionally, limiting its availability to 3 to 5 days will urge players to make a quicker purchase decision.

    For example, BattleHand’s starter pack is surfaced around the 4th session, it is available for 36hrs and contains the following items to aid players in all areas of the game:

  • Powerful cards that have an immediate effect in battle
  • High rarity upgrade materials to upgrade your card deck
  • A generous amount of soft currency that can be used in all areas of the game
  • A generous amount of hard currency so players can purchase premium store items
  • Rare upgrade materials for Heroes
[Example starter pack offer in Battle Hands]
Thanks to the strength of the promotion over 50% of players choose the Starter Pack instead of the regular gems offerings:
  • How: There are many ways you can implement premium content and goods in your game, such as power-ups, characters, equipment, maps, hints, chapters etc. The two most impactful monetization designs are:
      Gacha - There are many ways to design, present and balance gacha but the key is to have randomized rewards, which allows you to sell extremely powerful items that players want without having to charge really high prices per purchase.
[Example of randomized rewards in Raid Brigade’s boxes]
      LiveOps - Limited time content on a regular cadence will also create really compelling opportunities for the players to both engage further with the game and invest in the game. For instance, Adventure Capitalist has been releasing regular limited themed time events with their spin on the permanent content, their own progression, achievements and IAP promotions.
[Example timed event for Adventure Capitalist]

Through this initiative, the game has seen regular increases in both engagement and revenue during event times without affecting the non-event periods:

[Timed events drastically increase engagement and revenue without lowering the baseline average over time]

5. Take into account local prices and pricing models

Just like different people have different willingness-to-pay, different markets have different purchasing powers.

    • Test what price points make sense for local consumers in each major market. Don’t just apply an umbrella discount, find the price points that maximize total revenue.
    • Consider charm pricing but remember it doesn’t work everywhere. For example, in the United States, prices always end in $x.99, but that’s not the case in Japan and Korea, where rounded numbers are used. Pricing in accordance to the local norm signals to the customers that you care and designed the game with them in mind. The Google Developer Console now automatically applies local pricing conventions of each currency for you.

Check out the Android Developer Story from games developer, Divmob, who improved their game’s monetization threefold simply by adopting sub-dollar pricing strategies. Also, learn more best practices about building for billions to get more tips on monetization.

Get the Playbook for Developers app and stay up-to-date with more features and best practices that will help you grow a successful business on Google Play.

Announcing Android add-ons for Docs and Sheets



We know many of you consider your mobile device as your primary tool to consume business information, but what if you could use it to get more work done, from anywhere? We’re excited to introduce Android add-ons for Docs and Sheets, a new way for you to do just that—whether it’s readying a contract you have for e-signature from your phone, or pulling in CRM data on your tablet for some quick analysis while waiting for your morning coffee, Android add-ons can help you accomplish more.

Get more done with your favorite third-party apps, no matter where you are

We’ve worked with eight integration partners who have created seamless integrations for Docs and Sheets. Here’s a preview of just a few of them:
  • DocuSign - Trigger or complete a signing process from Docs or Sheets, and save the executed document to Drive. Read more here.
DocuSign lets you easily create signature envelopes right from Google Docs
  • ProsperWorks - Import your CRM data to create and update advanced dashboards, reports and graphs on Sheets, right from your device. Read more here.
  • AppSheet - Create powerful mobile apps directly from your data in Sheets instantly — no coding required. Read more here.
  • Scanbot - Scan your business documents using built-in OCR, and insert their contents into Docs as editable text. Read more here.


You can find these add-ons and many more, including PandaDoc, ZohoCRM, Teacher Aide, EasyBib and Classroom in our Google Play collection as well as directly from the add-on menus in Docs or Sheets.


Try them out today, and see how much more you can do.


Calling all developers: try our developer preview today!

As you can see from above, Android add-ons offer a great opportunity to build innovative integrations and reach Docs and Sheets users around the world. They’re basically Android apps that connect with Google Apps Script projects on the server-side, allowing them to access and manipulate data from Google Docs or Sheets using standard Apps Script techniques. Check out our documentation which includes UI guidelines as well as sample code to get you started. We’ve also made it easy for you to publish your apps with the Apps Script editor.

Android add-ons are available today as a developer preview. We look forward to seeing what you build!

Protecting Android with more Linux kernel defenses

Posted by Jeff Vander Stoep, Android Security team

Android relies heavily on the Linux kernel for enforcement of its security model. To better protect the kernel, we’ve enabled a number of mechanisms within Android. At a high level these protections are grouped into two categories—memory protections and attack surface reduction.

Memory protections

One of the major security features provided by the kernel is memory protection for userspace processes in the form of address space separation. Unlike userspace processes, the kernel’s various tasks live within one address space and a vulnerability anywhere in the kernel can potentially impact unrelated portions of the system’s memory. Kernel memory protections are designed to maintain the integrity of the kernel in spite of vulnerabilities.

Mark memory as read-only/no-execute

This feature segments kernel memory into logical sections and sets restrictive page access permissions on each section. Code is marked as read only + execute. Data sections are marked as no-execute and further segmented into read-only and read-write sections. This feature is enabled with config option CONFIG_DEBUG_RODATA. It was put together by Kees Cook and is based on a subset of Grsecurity’s KERNEXEC feature by Brad Spengler and Qualcomm’s CONFIG_STRICT_MEMORY_RWX feature by Larry Bassel and Laura Abbott. CONFIG_DEBUG_RODATA landed in the upstream kernel for arm/arm64 and has been backported to Android’s 3.18+ arm/arm64 common kernel.

Restrict kernel access to userspace

This feature improves protection of the kernel by preventing it from directly accessing userspace memory. This can make a number of attacks more difficult because attackers have significantly less control over kernel memory that is executable, particularly with CONFIG_DEBUG_RODATA enabled. Similar features were already in existence, the earliest being Grsecurity’s UDEREF. This feature is enabled with config option CONFIG_CPU_SW_DOMAIN_PAN and was implemented by Russell King for ARMv7 and backported to Android’s 4.1 kernel by Kees Cook.

Improve protection against stack buffer overflows

Much like its predecessor, stack-protector, stack-protector-strong protects against stack buffer overflows, but additionally provides coverage for more array types, as the original only protected character arrays. Stack-protector-strong was implemented by Han Shan and added to the gcc 4.9 compiler.

Attack surface reduction

Attack surface reduction attempts to expose fewer entry points to the kernel without breaking legitimate functionality. Reducing attack surface can include removing code, removing access to entry points, or selectively exposing features.

Remove default access to debug features

The kernel’s perf system provides infrastructure for performance measurement and can be used for analyzing both the kernel and userspace applications. Perf is a valuable tool for developers, but adds unnecessary attack surface for the vast majority of Android users. In Android Nougat, access to perf will be blocked by default. Developers may still access perf by enabling developer settings and using adb to set a property: “adb shell setprop security.perf_harden 0”.

The patchset for blocking access to perf may be broken down into kernel and userspace sections. The kernel patch is by Ben Hutchings and is derived from Grsecurity’s CONFIG_GRKERNSEC_PERF_HARDEN by Brad Spengler. The userspace changes were contributed by Daniel Micay. Thanks to Wish Wu and others for responsibly disclosing security vulnerabilities in perf.

Restrict app access to ioctl commands

Much of Android security model is described and enforced by SELinux. The ioctl() syscall represented a major gap in the granularity of enforcement via SELinux. Ioctl command whitelisting with SELinux was added as a means to provide per-command control over the ioctl syscall by SELinux.

Most of the kernel vulnerabilities reported on Android occur in drivers and are reached using the ioctl syscall, for example CVE-2016-0820. Some ioctl commands are needed by third-party applications, however most are not and access can be restricted without breaking legitimate functionality. In Android Nougat, only a small whitelist of socket ioctl commands are available to applications. For select devices, applications’ access to GPU ioctls has been similarly restricted.

Require seccomp-bpf

Seccomp provides an additional sandboxing mechanism allowing a process to restrict the syscalls and syscall arguments available using a configurable filter. Restricting the availability of syscalls can dramatically cut down on the exposed attack surface of the kernel. Since seccomp was first introduced on Nexus devices in Lollipop, its availability across the Android ecosystem has steadily improved. With Android Nougat, seccomp support is a requirement for all devices. On Android Nougat we are using seccomp on the mediaextractor and mediacodec processes as part of the media hardening effort.

Ongoing efforts

There are other projects underway aimed at protecting the kernel:

  • The Kernel Self Protection Project is developing runtime and compiler defenses for the upstream kernel.
  • Further sandbox tightening and attack surface reduction with SELinux is ongoing in AOSP.
  • Minijail provides a convenient mechanism for applying many containment and sandboxing features offered by the kernel, including seccomp filters and namespaces.
  • Projects like kasan and kcov help fuzzers discover the root cause of crashes and to intelligently construct test cases that increase code coverage—ultimately resulting in a more efficient bug hunting process.

Due to these efforts and others, we expect the security of the kernel to continue improving. As always, we appreciate feedback on our work and welcome suggestions for how we can improve Android. Contact us at [email protected].

Android Developer Story: Culture Alley reaches millions of English learners on Google Play

Posted by Lily Sheringham, Google Play team

Culture Alley developed the app Hello English to help Indians learn English through gamification, supporting over 15 dialects. More than 13 million people now use Hello English in India and around the world.

Hear Nishant Patni, Founder & CEO and Pranshu Bhandari, Co-Founder, explain how they optimized the app to address challenges faced by emerging markets. Learn how they used various Google Play tools to address varying levels of connectivity and device capabilities, and improve user retention.

Learn more best practices about building for billions and watch the ‘10 tips to build an app for billions of users’ video to get more tips. Also, get the Playbook for Developers app and stay up-to-date with more features and best practices that will help you grow a successful business on Google Play.

Introducing new app categories — From Art to Autos to Dating — to help users better find your apps

Posted by By Sarah Karam, Google Play Apps Business Development

With more than 1 billion active users in 190 countries around the world, Google Play continues to be an important distribution platform for you to build a global audience. To help you get your apps in front of more users, it’s important to make them more quickly and easily discoverable in Google Play. That’s why we rolled out major features, such as Search Ads, Indie Corner, store listing experiments, and more, over the past year.

To improve the overall search experience, we’re introducing new app categories and renaming a few existing ones, making them more comprehensive and relevant to what users are looking for today.

The new categories include:

  • Art & Design
  • Auto & Vehicles
  • Beauty
  • Dating
  • Events
  • Food & Drink
  • House & Home
  • Parenting

In addition, the “Transportation” category will be renamed “Maps & Navigation,” and the “Media & Video” category will be renamed “Video Players & Editors.”

To select a new category for your app or game

  1. Sign in to your Google Play Developer Console.
  2. Select an app.
  3. On the left menu, click Store Listing.
  4. Under "Categorization," select an application type and category.
  5. Near the top of the page, click Save draft (new apps) or Submit update (existing apps).

Newly added categories will be available on Google Play within 60 days. If you choose a newly added category for an app before the category is available for users, your current app category may change. See additional details and view our full list of categories in the Help Center.

Improvements for smaller app downloads on Google Play

Posted by Anthony Morris, SWE Google Play

Google Play continues to grow rapidly, as Android users installed over 65 billion apps in the last year from the Google Play Store. We’re also seeing developers move to update their apps more frequently to push great new content, patch security vulnerabilities, and iterate quickly on user feedback.

However, many users are sensitive to the amount of data they use, especially if they are not on Wi-Fi. Google Play is investing in improvements to reduce the data that needs to be transferred for app installs and updates, while making data cost more transparent to users.

Read on to understand the updates and learn some tips for ways to optimize the size of your APK.

New Delta algorithm to reduce the size of app updates

For approximately 98% of app updates from the Play Store, only changes (deltas) to APK files are downloaded and merged with the existing files, reducing the size of updates. We recently rolled out a delta algorithm, bsdiff, that further reduces patches by up to 50% or more compared to the previous algorithm. Bsdiff is specifically targeted to produce more efficient deltas of native libraries by taking advantage of the specific ways in which compiled native code changes between versions. To be most effective, native libraries should be stored uncompressed (compression interferes with delta algorithms).

An example from Chrome:

Patch Description Previous patch size Bsdiff Size
M46 to M47 major update 22.8 MB 12.9 MB
M47 minor update 15.3 MB 3.6 MB

Apps that don’t have uncompressed native libraries can see a 5% decrease in size on average, compared to the previous delta algorithm.

Applying the delta algorithm to APK Expansion Files to further reduce update size

APK Expansion Files allow you to include additional large files up to 2GB in size (e.g. high resolution graphics or media files) with your app, which is especially popular with games. We have recently expanded our delta and compression algorithms to apply to these APK Expansion Files in addition to APKs, reducing the download size of initial installs by 12%, and updates by 65% on average.

Clearer size information in the Play Store

Alongside the improvements to reduce download size, we also made information displayed about data used and download sizes in the Play Store clearer. You can now see actual download sizes, not the APK file size, in the Play Store. If you already have an app, you will only see the update size. These changes are rolling out now.

Example 1: Showing new “Download size” of APK

Example 2: Showing new “Update size” of APK

Tips to reduce your download sizes

1. Optimize for the right size measurements: Users care about download size (i.e. how many bytes are transferred when installing/updating an app), and they care about disk size (i.e. how much space the app takes up on disk). It’s important to note that neither of these are the same as the original APK file size nor necessarily correlated.


Chrome example:
Compressed Native Library Uncompressed Native Library
APK Size 39MB 52MB (+25%)
Download size (install) 29MB 29MB (no change)
Download size (update) 29MB 21MB (-29%)
Disk size 71MB 52MB (-26%)/td>

Chrome found that initial download size remained the same by not compressing the native library in their APK, while the APK size increased, because Google Play already performs compression for downloads. They also found that the update size decreased, as deltas are more effective with uncompressed files, and disk size decreased as you no longer need an compressed copy of the native library:

2. Reduce your APK size: Remove unnecessary data from the APK like unused resources and code.

3. Optimize parts of your APK to make them smaller: Using more efficient file formats, for example by using WebP instead of JPEG, or by using Proguard to remove unused code.

Read more about reducing APK sizes and watch the I/O 2016 session ‘Putting Your App on a Diet’ to learn from Wojtek Kaliciński, about how to reduce the size of your APK.

Connecting your App to a Wi-Fi Device

Posted by Rich Hyndman, Android Developer Advocate

With the growth of the Internet of Things, connecting Android applications to Wi-Fi enabled devices is becoming more and more common. Whether you’re building an app for a remote viewfinder, to set up a connected light bulb, or to control a quadcopter, if it’s Wi-Fi based you will need to connect to a hotspot that may not have Internet connectivity.

From Lollipop onwards the OS became a little more intelligent, allowing multiple network connections and not routing data to networks that don’t have Internet connectivity. That’s very useful for users as they don’t lose connectivity when they’re near Wi-Fis with captive portals. Data routing APIs were added for developers, so you can ensure that only the appropriate app traffic is routed over the Wi-Fi connection to the external device.

To make the APIs easier to understand, it is good to know that there are 3 sets of networks available to developers:

  • WiFiManager#startScan returns a list of available Wi-Fi networks. They are primarily identified by SSID.
  • WiFiManager#getConfiguredNetworks returns a list of the Wi-Fi networks configured on the device, also indexed by SSID, but they are not necessarily currently available.
  • ConnectivityManager#getAllNetworks returns a list of networks that are being interacted with by the phone. This is necessary as from Lollipop onwards a device may be connected to multiple networks at once, Wi-Fi, LTE, Bluetooth, etc… The current state of each is available by calling ConnectivityManager#getNetworkInfo and is identified by a network ID.

In all versions of Android you start by scanning for available Wi-Fi networks with WiFiManager#startScan, iterate through the ScanResults looking for the SSID of your external Wi-Fi device. Once you’ve found it you can check if it is already a configured network using WifiManager#getConfiguredNetworks and iterating through the WifiConfigurations returned, matching on SSID. It’s worth noting that the SSIDs of the configured networks are enclosed in double quotes, whilst the SSIDs returned in ScanResults are not.

If your network is configured you can obtain the network ID from the WifiConfiguration object. Otherwise you can configure it using WifiManager#addNetwork and keep track of the network id that is returned.

To connect to the Wi-Fi network, register a BroadcastReceiver that listens for WifiManager.NETWORK_STATE_CHANGED_ACTION and then call WifiManager.enableNetwork (int netId, boolean disableOthers), passing in your network ID. The enableNetwork call disables all the other Wi-Fi access points for the next scan, locates the one you’ve requested and connects to it. When you receive the network broadcasts you can check with WifiManager#getConnectionInfo that you’re successfully connected to the correct network. But, on Lollipop and above, if that network doesn’t have internet connectivity network, requests will not be routed to it.

Routing network requests

To direct all the network requests from your app to an external Wi-Fi device, call ConnectivityManager#setProcessDefaultNetwork on Lollipop devices, and on Marshmallow call ConnectivityManager#bindProcessToNetwork instead, which is a direct API replacement. Note that these calls require android.permission.INTERNET; otherwise they will just return false.

Alternatively, if you’d like to route some of your app traffic to the Wi-Fi device and some to the Internet over the mobile network:

Now you can keep your users connected whilst they benefit from your innovative Wi-Fi enabled products.

Android Developer Story: StoryToys finds success in the ‘Family’ section on Google Play

Posted by Lily Sheringham, Google Play team

Based in Dublin, Ireland, StoryToys is a leading publisher of interactive books and games for children. Like most kids’ app developers, they faced the challenges of engaging with the right audiences to get their content discovered. Since the launch of the Family section on Google Play, StoryToys has experienced an uplift of 270% in revenue and an increase of 1300% in downloads.

Hear Emmet O’Neill, Chief Product Officer, and Gavin Barrett, Commercial Director, discuss how the Family section creates a trusted and creative space for families to find new content. Also hear how beta testing, localized pricing and more, has allowed StoryToy’s flagship app, My Very Hungry Caterpillar, to significantly increase engagement and revenue.

Learn more about Google Play for Families and get the Playbook for Developers app to stay up-to-date with more features and best practices that will help you grow a successful business on Google Play.