close
The Wayback Machine - https://web.archive.org/web/20161213180436/https://android-developers.blogspot.com/

13 December 2016

Android Wear 2.0 Developer Preview 4: Authentication, In-App Billing, and more

Posted by Hoi Lam, Developer Advocate

BERJAYA

A key part of Android Wear 2.0 is letting watch apps work as standalone apps, so users can respond to messages, track their fitness, and use their favorite apps, even when their phone isn't around. Developer Preview 4 includes a number of new APIs that will help you build more powerful standalone apps.

Seamless authentication

To make authentication a seamless experience for both Android phone and iPhone users, we have created new APIs for OAuth and added support for one-click Google Sign-in. With the OAuth API for Android Wear, users can tap a button on the watch that opens an authentication screen on the phone. Your watch app can then authenticate with your server side APIs directly. With Google Sign-In, it's even easier. All the user needs to do is select which account they want to authenticate with and they are done.

In-app billing

In addition to paid apps, we have added in-app billing support, to give you another way to monetize your Android Wear app or watch face. Users can authorize purchases quickly and easily on the watch through a 4-digit Google Account PIN. Whether it's new levels in a game or new styles on a watch face, if you can build it, users can buy it.

Cross-device promotion

What if your watch app doesn't work standalone? Or what if it offers a better user experience when both the watch and phone apps are installed? We've been listening carefully to your feedback, and we've added two new APIs (PlayStoreAvailability and RemoteIntent) to help you navigate users to the Play Store on a paired device so they can more-easily install your app. Developers can also open custom URLs on the phone from the watch via the new RemoteIntent API; no phone app or data layer is required.

// Check Play Store is available
int playStoreAvailabilityOnPhone =
    PlayStoreAvailability.getPlayStoreAvailabilityOnPhone(getApplicationContext());

if (playStoreAvailabilityOnPhone == PlayStoreAvailability.PLAY_STORE_ON_PHONE_AVAILABLE) {
    // To launch a web URL, setData to Uri.parse("https://g.co/wearpreview")
    Intent intent =
        new Intent(Intent.ACTION_VIEW)
            .addCategory(Intent.CATEGORY_BROWSABLE)
            .setData(Uri.parse("market://details?id=com.google.android.wearable.app"));
    // mResultReceiver is optional; it can be null.
    RemoteIntent.startRemoteActivity(this, intent, mResultReceiver);
}

Swipe-to-dismiss is back

Many of you have given us the feedback that the swipe-to-dismiss gesture from Android Wear 1.0 is an intuitive time-saver. We agree, and have reverted back to the previous behavior with this developer preview release. To support swipe-to-close in this release, we've made the following platform and API changes:

  • Activities now automatically support swipe-to-dismiss. Swiping an activity from left to right will result in it being dismissed and the app will navigate down the back stack.
  • New Fragment and View support. Developers can wrap the containing views of a Fragment or Views in general in the new SwipeDismissFrameLayout to implement custom actions such as going down the back stack when the user swipes rather than exiting the activity.
  • Hardware button now maps to "power" instead of "back" which means it can no longer be intercepted by apps.

Additional details are available under the behavior changes section of the Android Wear Preview site.

Compatibility with Android Wear 1.0 apps

Android Wear apps packaged using the legacy embedded app mechanism can now be delivered to Android Wear 2.0 watches. When a user installs a phone app that also contains an embedded Android Wear app, the user will be prompted to install the embedded app via a notification. If they choose not to install the embedded app at that moment, they can find it in the Play Store on Android Wear under a special section called "Apps you've used".

Despite support for the existing mechanism, there are significant benefits for apps that transition to the multi-APK delivery mechanism. Multi-APK allows the app to be searchable in the Play Store on Android Wear, to be eligible for merchandising on the homepage, and to be remotely installed from the web to the watch. As a result, we strongly recommend that developers move to multi-APK.

More additions in Developer Preview 4

  • Action and Navigation Drawers: An enhancement to peeking behavior allows the user to take action without scrolling all the way to the top or bottom of a list. Developers can further fine-tune drawer peeking behavior through new APIs, such as setShouldPeekOnScrollDown for the action drawer.
  • WearableRecyclerView: The curved layout is now opt-in, and with this, the WearableRecyclerView is now a drop-in replacement for RecyclerView.
  • Burn-in protection icon for complications: Complication data providers can now provide icons for use on screens susceptible to burn-in. These burn-in-safe icons are normally the outline of the icon in interactive mode. Previously, watch faces may have chosen not to display the icon at all in ambient mode to prevent screen burn-in.

Feedback welcome!

Thanks for all your terrific feedback on Android Wear 2.0. Check out g.co/wearpreview for the latest builds and documentation, keep the feedback coming by filing bugs or posting in our Android Wear Developers community, and stay tuned for Android Wear Developer Preview 5!

Announcing updates to Google’s Internet of Things platform: Android Things and Weave

Posted by Wayne Piekarski, Developer Advocate for IoT

The Internet of Things (IoT) will bring computing to a whole new range of devices. Today we're announcing two important updates to our IoT developer platform to make it faster and easier for you to create these smart, connected products.

We're releasing a Developer Preview of Android Things, a comprehensive way to build IoT products with the power of Android, one of the world's most supported operating systems. Now any Android developer can quickly build a smart device using Android APIs and Google services, while staying highly secure with updates direct from Google. We incorporated the feedback from Project Brillo to include familiar tools such as Android Studio, the Android Software Development Kit (SDK), Google Play Services, and Google Cloud Platform. And in the coming months, we will provide Developer Preview updates to bring you the infrastructure for securely pushing regular OS patches, security fixes, and your own updates, as well as built-in Weave connectivity and more.

There are several turnkey hardware solutions available for you to get started building real products with Android Things today, including Intel Edison, NXP Pico, and Raspberry Pi 3. You can easily scale to large production runs with custom designs of these solutions, while continuing to use the same Board Support Package (BSP) from Google.

We are also updating the Weave platform to make it easier for all types of devices to connect to the cloud and interact with services like the Google Assistant. Device makers like Philips Hue and Samsung SmartThings already use Weave, and several others like Belkin WeMo, LiFX, Honeywell, Wink, TP-Link, and First Alert are implementing it. Weave provides all the cloud infrastructure, so that developers can focus on building their products without investing in cloud services. Weave also includes a Device SDK for supported microcontrollers and a management console. The Weave Device SDK currently supports schemas for light bulbs, smart plugs and switches, and thermostats. In the coming months we will be adding support for additional device types, custom schemas/traits, and a mobile application API for Android and iOS. Finally, we're also working towards merging Weave and Nest Weave to enable all classes of devices to connect with each other in a secure and reliable way. So whether you started with Google Weave or Nest Weave, there is a path forward in the ecosystem.

This is just the beginning of the IoT ecosystem we want to build with you. To get started, check out Google's IoT developer site, or go directly to the Android Things, Weave, and Google Cloud Platform sites for documentation and code samples. You can also join Google's IoT Developers Community on Google+ to get the latest updates and share and discuss ideas with other developers.

BERJAYA
BERJAYA

12 December 2016

Five steps to achieve sustainable growth and boost your app's long term success

Maxim Mai, Business Development Manager, Google Play

Maintaining sustainable growth is difficult for even the highest quality apps. In this video and through the 5 steps below you can find out how some of our leading Android developers are tackling growth.




1) Understand and define your app's objectives

Depending on your product lifecycle stage you will most likely focus on these 3 growth goals with varying intensity:

  • Acquire new users
  • Increase engagement and retention
  • Grow revenue

2) Track and measure your tactics against each of your objectives

List out the tactics you're using to achieve each objective and keep track of their performance. You can visualize it using a scorecard like in the example below created by Mobile Growth Stack.

BERJAYA

3) Apply your growth tactics.

Here are a few examples of specific tactics developers have successfully used to drive sustained growth.

Tactic: Clue, a female health app, invests in the Play store listing to increase conversions.

Results: 24% aggregate increase in install conversion rate over a period of 6 months.

How they did it:

BERJAYA

Which phone screenshot do you think drove increase in install conversion for Clue?

Tactic: ShareTheMeal, a non-profit app developed by the World Food Programme, uses public relations as a free sustainable acquisition channel.

Results: 50% of their total installs to date were driven by media coverage.

How they did it:

  • Developed an excellent messaging.
  • Boosted installs impact by combining PR with celebrity outreach and distribution partnership.
  • Learned that TV coverage has the highest impact on installs but print is a useful door opener to amplify TV coverage.

Tactic: Viral growth. Virality is a core growth tool for apps and games that focus on sharing and usually the mechanic is built into the core user experience of the product. However, even if sharing isn't a key component of your app, you can still influence two key variables to create an appropriate environment to encourage virality.

How to do it:

  • Increase the number of additional users that a single user brings to the app, by boosting the number of invitations sent.
  • Decrease your "cycle time", how long it takes between inviting a user and that user sending out the next round of invitations to their friends.
  • Offer more incentives for users to share the app or its content while they're using it will help shorten the cycle time and kickstart viral growth!

Tactic: Freeletics Nutrition, an app to adjust your nutrition to your individual needs and goals, uses cross-promotion to accelerate the launch of a new product.

Results: 96% of new Nutrition app sales generated by users who originally registered for the developer's Bodyweight training app.

How they did it:

  • Surface meal advice in the Bodyweight app's activity feed with the goal of raising awareness for the approaching launch of their new Freeletics Nutrition app.
BERJAYA

4) Build a strong growth culture

To make sustainable growth work for your app, it needs to be a part of your culture. Runtastic is one of the leading health and fitness app developers in Europe and 95% of their approximately 76M total app installs on Google Play have been generated organically. Mario Aichlseder, VP of Growth, believes this is the result of a strong growth culture and the growth principles according to which all teams operate. For example, product managers, designers and engineers at Runtastic deliberately chose a mixture of qualitative and quantitative feedback loops during the app development process to ensure they stay true to their growth principles.

5) Adjust along the way

It's important to track your tactics against real metrics to measure your impact. That will help you make decisions about where to increase or decrease your efforts. Your priorities will also change based on the evolution of your business and product lifecycle as well as due to external factors such as new techniques becoming available, so be open to regularly adjusting your tactics.

Get more tips and best practices in the sessions from this year's Playtime events.


How useful did you find this blogpost?



BERJAYA

08 December 2016

How augmented reality helps you buy furniture and capture Pokémon

Posted by Jamil Moledina, Games Strategic Lead, Google Play

Online furniture seller Wayfair and Niantic's Pokémon GO have more in common than you might think. Both of these companies use augmented reality to create innovative, immersive experiences for their users. I sat down with Mike Festa, Director of Wayfair Next, and Tatsuo Nomura, Product Manager for Pokémon GO, at our recent Playtime event to discuss how developers can make the most of AR as a platform.

From 3D furniture modelling in WayfairView using Tango, to logging countless miles catching Pokémon, hear how these developers are innovating with AR, and get their advice for others looking to use AR in their apps and games.

Check out more sessions from our global Playtime events to learn best practices for your app and game businesses. Also, stay up to date with more videos from events, product news, and tips to help grow your business on Google Play with the Playbook for Developers app.

How useful did you find this blogpost?



BERJAYA

07 December 2016

Watch sessions from the Playtime 2016 events to learn how to succeed on Android & Google Play

Posted by Patricia Correa, Head of Developer Marketing, Google Play

We’re wrapping up our annual global Playtime series of events with a last stop in Tokyo, Japan. This year Google Play hosted events in 10 cities: London, Paris, Berlin, Hong Kong, Singapore, Gurgaon, San Francisco, Sao Paulo, Seoul and Tokyo. We met with app and game developers from around the world to discuss how to build successful businesses on Google Play, share experiences, give feedback, collaborate, and get inspired. You can now watch some of the best Playtime sessions on our Android Developers YouTube Channel, as listed below. The playlist opens with a video that celebrates collaboration.

Keynote

What’s next for Google Play

Learn how we're helping users discover apps in the right context, creating new ways to engage with users beyond the install, and powering innovative experiences on emerging platforms like virtual reality, wearables, and auto.

Develop and launch apps & games

Android development in 2016

Android development is more powerful and efficient than ever before. Android Studio brings you speed, smarts, and support for Android Nougat. The broad range of cross-platform tools on Firecase can improve your app on Android and beyond. Material Design and Vulkan continue to improve the user experience and increase engagement.

Daydream & Tango

Daydream View is a VR headset and controller by Google that lets people explore new worlds, or play games that put them at the center of action. Learn how we're helping users discover apps in the right context and powering new experiences with Daydream and Tango.

Fireside chat - Wayfair & Pokémon GO on augmented reality

Augmented reality engages and delights people everywhere. In this fireside chat, online furniture seller Wayfair and Niantic's Pokémon GO share their experiences with AR and discuss how other developers can make the most of the platform.

Building for billions, featuring best practices from Maliyo Games

Learn how to create apps and games for emerging markets, which are expected to drive 80% of global smartphone growth by 2020, by recognizing the key challenges and designing the right app experiences to overcome them.

At minute 16:41, hear tips from Hugo Obi, co-founder of Nigerian games developer Maliyo.

Launch smart on Google Play

Set your app up for success using experimentation and iteration. Learn best practices for soft launching and adapting your app for different markets and device types.

Apps

Sustainable growth solves most problems for apps, featuring best practices from SoundCloud & Peak

Planning and executing a great growth strategy involves a complex set of choices and mastery of many tools. In this session we discuss topics including key business objectives, tools, and techniques to help you solve the growth puzzle with our partner, SoundCloud.

Also, check out some growth best practices from Peak.

Creating sustainable user growth for startups, by Greylock

User growth isn't just about growing the number of users you have. The key to sustainability is creating and delivering core product value. In this session, VC Greylock discusses how to identify your core action to focus on and shows you how to use these insights to optimize your app for long term growth.

App engagement is the new black, featuring best practices from Lifesum

As the app marketplace becomes more competitive, developer success depends on retaining users in apps they love. Find out which Google tools and features can help you analyze your users' behaviors, improve engagement and retention in your app and hear insights from others developers including Lifesum.

Predicting lifetime value in the apps world

Deepdive into lifetime value models and predictive analytics in the apps ecosystem. Tactics to get the most out of identified segments and how to upgrade their behaviors to minimize churn.

Subscriptions update

Learn about Google's efforts to enable users, around the world, to seamlessly and safely pay for content. This session provides updates on Google Play billing and recent enhancements to our subscriptions platform.

Games

One game fits all, featuring best practices from Space Ape Games

Customize your game's experience for different users by targeting them with lifetime value models and predictive analytics. Hear how these concepts are applied by Space Ape Games to improve retention and monetization of their titles.

Promoting your game and growing your user base, featuring best practices from Seriously

Learn how to use Google's latest tools, like Firebase, for benchmarking, acquiring users and measuring your activities. Also, hear game developer Seriously share their latest insights and strategies on YouTube influencer campaigns.

Creating long-term retention, loyalty and value with engaging LiveOps events, featuring best practices from Kabam & Creative Mobile

Learn how successful developers keep their games fresh and engaging with Live Operations. In this talk, the LiveOps expert on Marvel: Contest of Champions discusses tips about the art and science of running an engaging LiveOps event.

Also check out the tips and best practices to run successful LiveOps from games developer Creative Mobile.

Panel - Play fair: Maintaining a level playing field in your game, featuring Space Ape Games and Kongregate

Ensuring that your game is fair is critical to success. Find out how game developers are achieving this and some ways Google Play can help.

Families

Why you need to build for families

Family-based households with children have higher tablet and smartphone ownership rates than the general population. These families are more likely to make purchases on their mobile devices and play games. Learn about how parents choose what to download and buy, and how you can prepare for maximum conversion.

Two keys to growth: user acquisition & app engagement, by Cartoon Network

Hear how Cartoon Network leverages their network to cross-promote new titles, acquire new users and keep them engaged through immersive experiences.

Go global: Getting ready for the emerging markets revolution, by Papumba

Papumba has a clear vision to grow a global business. Hear how they work with experts to adapt their games to local markets and leverage Google Play's developer tools to find success around the world.

Optimizing for a post install world

You've spent time and resources getting users to download your apps, but what happens after the install? Learn how to minimize churn and keep families engaged with your content long term.

Monetization best practices on freemium, by 01 Digital

Learn how 01 Digital uses In-App-Purchases (IAP) to effectively monetize their apps while maintaining a safe environment for families.

Building a subscription business that appeals to parents, by PlayKids

PlayKids has been at the forefront of the subscription business model since their inception. See how they best serve their subscribers by refreshing their content, expanding their offerings and investing in new verticals.



How useful did you find this blogpost?


BERJAYA


06 December 2016

Saving Data: Reducing the size of App Updates by 65%

Posted by Andrew Hayden, Software Engineer on Google Play

Android users are downloading tens of billions of apps and games on Google Play. We're also seeing developers update their apps frequently in order to provide users with great content, improve security, and enhance the overall user experience. It takes a lot of data to download these updates and we know users care about how much data their devices are using. Earlier this year, we announced that we started using the bsdiff algorithm (by Colin Percival). Using bsdiff, we were able to reduce the size of app updates on average by 47% compared to the full APK size.

Today, we're excited to share a new approach that goes further — File-by-File patching. App Updates using File-by-File patching are, on average, 65% smaller than the full app, and in some cases more than 90% smaller.

The savings, compared to our previous approach, add up to 6 petabytes of user data saved per day!

In order to get the new version of the app, Google Play sends your device a patch that describes the differences between the old and new versions of the app.

Imagine you are an author of a book about to be published, and wish to change a single sentence - it's much easier to tell the editor which sentence to change and what to change, rather than send an entirely new book. In the same way, patches are much smaller and much faster to download than the entire APK.

Techniques used in File-by-File patching

Android apps are packaged as APKs, which are ZIP files with special conventions. Most of the content within the ZIP files (and APKs) is compressed using a technology called Deflate. Deflate is really good at compressing data but it has a drawback: it makes identifying changes in the original (uncompressed) content really hard. Even a tiny change to the original content (like changing one word in a book) can make the compressed output of deflate look completely different. Describing the differences between the original content is easy, but describing the differences between the compressed content is so hard that it leads to inefficient patches.

Watch how much the compressed text on the right side changes from a one-letter change in the uncompressed text on the left:

BERJAYA

File-by-File therefore is based on detecting changes in the uncompressed data. To generate a patch, we first decompress both old and new files before computing the delta (we still use bsdiff here). Then to apply the patch, we decompress the old file, apply the delta to the uncompressed content and then recompress the new file. In doing so, we need to make sure that the APK on your device is a perfect match, byte for byte, to the one on the Play Store (see APK Signature Schema v2 for why).

When recompressing the new file, we hit two complications. First, Deflate has a number of settings that affect output; and we don't know which settings were used in the first place. Second, many versions of deflate exist and we need to know whether the version on your device is suitable.

Fortunately, after analysis of the apps on the Play Store, we've discovered that recent and compatible versions of deflate based on zlib (the most popular deflate library) account for almost all deflated content in the Play Store. In addition, the default settings (level=6) and maximum compression settings (level=9) are the only settings we encountered in practice.

Knowing this, we can detect and reproduce the original deflate settings. This makes it possible to uncompress the data, apply a patch, and then recompress the data back to exactly the same bytes as originally uploaded.

However, there is one trade off; extra processing power is needed on the device. On modern devices (e.g. from 2015), recompression can take a little over a second per megabyte and on older or less powerful devices it can be longer. Analysis so far shows that, on average, if the patch size is halved then the time spent applying the patch (which for File-by-File includes recompression) is doubled.

For now, we are limiting the use of this new patching technology to auto-updates only, i.e. the updates that take place in the background, usually at night when your phone is plugged into power and you're not likely to be using it. This ensures that users won't have to wait any longer than usual for an update to finish when manually updating an app.

How effective is File-by-File Patching?

Here are examples of app updates already using File-by-File Patching:


Application
Original Size
Previous (BSDiff) Patch Size
(% vs original)
File-by-File Patch Size (% vs original)
71.1 MB
13.4 MB (-81%)
8.0 MB (-89%)
32.7 MB
17.5 MB (-46%)
9.6 MB (-71%)
17.8 MB
7.6 MB (-57%)
7.3 MB (-59%)
18.9 MB
17.2 MB (-9%)
13.1 MB (-31%)
52.4 MB
19.1 MB (-64%)
8.4 MB (-84%)
16.2 MB
7.7 MB (-52%)
1.2 MB (-92%)


Disclaimer: if you see different patch sizes when you press "update" manually, that is because we are not currently using File-by-file for interactive updates, only those done in the background.

Saving data and making our users (& developers!) happy

These changes are designed to ensure our community of over a billion Android users use as little data as possible for regular app updates. The best thing is that as a developer you don't need to do anything. You get these reductions to your update size for free!

If you'd like to know more about File-by-File patching, including the technical details, head over to the Archive Patcher GitHub project where you can find information, including the source code. Yes, File-by-File patching is completely open-source!

As a developer if you're interested in reducing your APK size still further, here are some general tips on reducing APK size.

BERJAYA

05 December 2016

Welcoming Android 7.1.1 Nougat

Posted by Dave Burke, VP of Engineering

Android Nougat

Android 7.1.1 Nougat!

Today we're rolling out an update to Nougat -- Android 7.1.1 for Pixel and Pixel XL devices and the full lineup of supported Nexus devices. We're also pushing the Android 7.1.1 source code to the Android Open Source Project (AOSP) so that device makers can get their hands on the latest version of Android.

With Android 7.1.1 officially on it's way to users, it's a good time to make sure your apps are ready.

What's in Android 7.1.1?

Android 7.1.1 is an incremental release that builds on the features already available on Pixel and Pixel XL devices, adding a handful of new features for consumers as well as optimizations and bug fixes on top of the base Android 7.1 platform (API level 25).

If you haven't explored the developer features, you'll want to take a look at app shortcuts, round icon resources, and image keyboard support, among others -- you can see the full list of developer features here. For details on API Level 25, check out the API diffs and the API reference.

You can find an overview of all of the Android Nougat developer resources here, including details on the core Android 7.0 Nougat behavior changes and developer features.c

Coming to consumer devices soon

We're starting the Android 7.1.1 rollout today, and we expect it to reach all eligible devices over the next several weeks. Pixel and Pixel XL devices will get the over-the-air (OTA) update, as will Nexus 5X, Nexus 6P, Nexus 6, Nexus 9, Nexus Player, Pixel C, and General Mobile 4G (Android One) devices. Devices enrolled in the Android Beta Program will receive the final version as well. As always, you can also download and flash this update manually.

We've also been working with our device manufacturer partners to bring Android 7.1.1 to their devices in the months ahead.

Make sure your apps are ready

Take this opportunity to test your apps for compatibility and optimize them to look their best on Android 7.1.1, such as by providing round icons and adding app shortcuts. We recommend compiling your app with, and ideally targeting, API 25. See our recent post for details.

With the final platform we’re updating the platform and build tools in Android Studio, as well as the API Level 25 emulator system images. The latest version of the support library (25.0.1) is also available for you to add image keyboard support, bottom navigation, and other features for devices running API Level 25 or earlier.

We're also providing downloadable factory and OTA images on the Nexus Images page to help you do final testing on your Pixel and Nexus devices. To help scale your testing, make sure to take advantage of Firebase Test Lab for Android and run your tests in the cloud at no charge through the end of December.

After your final testing, publish your apps to your alpha, beta, or production channels in the Google Play Developer Console.

What's next?

We'll soon be closing open bugs logged against Developer Preview builds, but please keep the feedback coming! If you still see an issue that you filed in the preview tracker, just file a new issue against Android 7.1 in the AOSP issue tracker. You can also continue to give us feedback or ask questions in the developer community.

As mentioned back in August, we've moved Android Nougat into a regular maintenance cycle and we're already started work on refinements and bug fixes for the next incremental update. If you have an eligible device that's currently enrolled in the Android Beta Program, your device will automatically receive preview updates of upcoming Android Nougat releases as soon as they are available. If you don't want to receive those updates, just visit the Beta site and unenroll the device.

Thanks for being part of the developer preview. Let us know how this year's preview met your needs by taking a short survey. Your feedback helps to shape our future releases.

BERJAYA