Tag Archives: Android Wear 2.0

Updates to Google Play policy promote standalone Android Wear apps

Posted by Hoi Lam, Lead Developer Advocate, Android Wear
Strava - a standalone wear app available to both Android and iOS users

Android Wear 2.0 represents the the latest evolution of the Android Wear platform. It introduced the concept of standalone apps that can connect to the network directly and work independently of a smartphone. This is critical to providing apps not only to our Android users, but also iOS users - which is increasingly important as we continue to expand our diverse ecosystem of watches and users. In addition, Wear 2.0 brought multi-APK support to Wear apps, which reduces the APK size of your phone apps, and makes it possible for iOS users to experience your Wear apps.

Today, we are announcing that multi-APKs will also work for Android Wear 1.0 watches, so you can now reach all of your users without needing to bundle your Wear app within your phone app's APK. Additionally, the Google Play Store policy will change to promote the use of multi-APKs and standalone apps. This covers all types of apps that are designed to run on the watch, including watch faces, complication data providers as well as launchable apps.

Policy change

The policy change will be effective from the 18th of January, 2018. At this time, the following apps will lose the "Enhanced for Android Wear" badge in the Google Play Store and will not be eligible to be listed in the top charts in the Play Store for Android Wear:

  • Mobile apps that support Wear notification enhancements but do not have a separate Wear app.
  • Wear apps that are bundled with mobile apps instead of using multi-APK.

Since multi-APK is now supported by devices running Wear 1.0 and 2.0, developers embedding their Wear app APKs in phone APKs should unbundle their Wear APK and upload it to the Play Store as a multi-APK. This will allow them to continue to qualify for the "Enhanced for Android Wear" badge as well as be eligible to appear in the Android Wear top charts. The two APKs can continue to share the same package name.

In addition to providing top app charts, we periodically put together curated featured collections. To be eligible for selection for these collections, developers will need to make their Wear apps function independently from the phone, as a standalone app. These apps will need to work on watches that are paired with both iOS and Android phones.

What are standalone apps?

Standalone apps are Wear apps that do not require a phone app to run. The app either does not require network access or can access the network directly without the phone app - something that is supported by Android Wear 2.0.

To mark your app as standalone, put the following meta-data tag in the AndroidManifest.xml:

    android:value="true" />

In some rare cases, the user experience may be enhanced by the syncing of data between the phone and watch. For example, a cycling app can use the watch to display the current pace, and measure the user's heart rate, while displaying a map on the phone. In this scenario, we recommend that developers ensure that their Wear apps function without a phone and treat the phone experience as optional as far as the Wear apps are concerned. In these cases, a Wear app is still considered standalone and should be marked as such in its AndroidManifest.xml file.

Wear what you want

From the beginning, Android Wear has been about wear what you want -- the styles, watches, and apps you want to wear. This latest policy change lets you highlight your Android Wear apps, giving users even more choice about what apps they want on their watches.

Android Wear: New complications tools and watch friendly UI library

Posted by Hoi Lam, Lead Developer Advocate, Android Wear
Android Wear 2.0 gives users more informative watch faces and provides developers with new ways to build useful apps. These new opportunities have been well received by users and developers alike. To help developers take advantage of these new features, we have released a suite of complication API tools, to make it easier for developers to add complication support to their watch faces, and a new Wear UI library, to help developers build watch friendly user interfaces.

New Complications API tools for Watch Face developers

Complications are bite-sized pieces of information displayed directly on the watch face. They can also be great shortcuts into your favorite apps. We introduced the Complications API last year to enable watch faces to receive data from any app that the user selects, and display the data to the user in a way that is stylistically coherent. Today, we are introducing four new tools to make it easier for watch face developers to integrate with the Complications API:

  • TextRenderer - Auto-sizes text to fit in bounds defined by watch face makers.
  • ComplicationDrawable - A full rendering solution for complications, that handles all the styling for you, and adjusts the layout to fit the space you specify
  • Easy watch face settings sample - Adoptable sample code that makes it easier to build complication settings with a rich and usable experience.
  • Complication test suite - A sample data provider to help check that your watch face can handle all the combinations of fields that can make up complication data.

It's never been easier to integrate complications into your watch faces.

New Wear UI Library for Wear developers

We have provided Android view components for building watch friendly user interfaces since the launch of Android Wear 1.0. Developers have told us that they would like to see these components open sourced. So, starting at Google I/O, we are open sourcing some components and providing some Android Wear UI components in the Android Support Library. This brings a number of advantages, including more consistent APIs with the rest of the Support Library, more frequent releases, and better responsiveness to developer feedback. We will:

  • Migrate Wearable Support classes - Migrate and update Android Wear specific view components, such as WearableRecyclerView, from android.support.wearable.view in Wearable Support to android.support.wear.widget in the Android Support Library. This new package is available as open source. In terms of developer impact, we expect the migration process to be simple, with minor API name changes to bring consistency with the existing Android Support Library.
  • Merge some Android Wear functionality to Android - Some Android Wear components have a lot of overlap with Android, e.g. CircledImageView and DelayedConfirmationView. We will merge the Android Wear specific functionality with the Android counterparts under android.support.v4.widget.
  • Deprecate outdated user interface patterns - Two user interface patterns are deprecated with Android Wear 2.0: the Card pattern and the Multi-directional layout. As a result, we have deprecated all supporting classes, such as GridViewPager and CardFragment. Please refer to the class reference docs for their replacements.

In the first wave of these changes, we migrated the WearableRecyclerView, BoxInsetLayout and SwipeDismissFrameLayout classes to the new Android Wear UI Library. We expect the migration process to continue during 2017, and developers will have until mid-2018 to migrate to the new UI components. For additional information, see Using the Wear UI Library.

Get started and give us feedback!

To get started with these new tools, simply update the Android Support Library in Android Studio and update your gradle build files to import the new support libraries. In addition to the documentation links above, check out the Google I/O session - Android Wear UI development best practice - where lead engineers for these tools will be on-hand to explain the technical details.

We will continue to update these tools over the next few months, based on your feedback. The sooner we hear from you, the more we can include, so don't be shy! Let us do some of the heavy lifting for your Android Wear apps and watch faces.