Skip to content

Most visited

Recently visited

navigation

Standalone Apps

A Wear app can work independently of a phone. Users can complete tasks on a watch, without access to an Android or iOS phone.

Planning Your Apps

You can use the multiple APK (multi-APK) feature of Google Play to publish more than one APK under the same application listing. A watch APK should be distributed using that feature; do not embed a watch APK in a phone APK. For information about setting up your app for distribution through the Google Play Store, see Packaging and Distributing Wear Apps and How Multiple APKs Work.

Note: To qualify for promotion in the Google Play Store on Wear (that is, in the on-watch Play Store), your app will need to function independently from a phone. Additionally, your Wear APK should not be embedded in a phone APK. For more information, see Updates to Google Play policy promote standalone Android Wear apps.

Generally, the minimum and target API level for a standalone app, and for Wear 2.0, is level 25. The minimum SDK level can be 23 only if you are using the same APK for Wear 1.0 and 2.0 (and thus have an embedded Wear 1.0 APK).

If you build a standalone Wear 2.0 APK and will continue to have a Wear 1.0 APK, please do both of the following:

Caution: If you publish an update to your existing, production phone APK that has removed an embedded Wear APK, production users who update the phone APK before installing your standalone Wear APK will lose their existing Wear app and its data. If you publish an update to your existing, production phone APK, continue to embed your watch APK into that phone APK.

Run-time permissions are required for standalone apps.

For information about network requests and high-bandwidth network access, see Network Access and Syncing.

Identifying an app as standalone

Wear apps must have a meta-data element in the Android Manifest file, as a child of the <application> element. The name of the meta-data element is com.google.android.wearable.standalone and the value must be true or false. The element indicates whether your watch app is a standalone app and thus doesn't require a phone-side Android app to operate. If the setting for the element is true, your app can be made available in the Play Store on watches paired to iPhones, as long as your active APKs in all channels (e.g., in the beta channel) have the element set to true. If not all of your APKs (alpha, beta, and production) that currently are served to users have the above setting, your app will be unavailable when a user searches on a watch paired to an iPhone.

A watch app can be considered as one of the following:

If a watch app is completely independent or semi-independent, it is considered to be in the standalone category. You must indicate this categorization to the Google Play store by setting the value of this meta-data element to true:

<application>
...
  <meta-data
    android:name="com.google.android.wearable.standalone"
    android:value="true" />
...
</application>

Since a standalone app (that is, an independent or semi-independent app) can be installed by an iPhone user or a user of an Android phone that lacks the Play Store, the watch app should be usable without the phone app.

If a watch app depends on a phone app, set the value of the above meta-data element to false. Setting the element to false signifies that the watch app should be installed only on a watch that is paired with a phone that has the Play Store.

Note: Even if the value is false, the watch app can be installed before the phone app is installed. Therefore, if a watch app detects that a companion phone lacks a necessary phone app, the watch app should prompt the user to install the phone app.

Shared Code and Data Storage

Code can be shared between a Wear app and a phone app. Optionally, code that is specific to a form factor can be in a separate module.

For example, common code for networking can be in a shared library.

You can use standard Android storage APIs to store data locally. For example, you can use the SharedPreferences APIs, SQLite, or internal storage (as you would in the case of a phone).

Detecting Your App on Another Device

Your watch app can detect if the corresponding phone app is available and vice versa.

Your phone app or watch app can use the CapabilityApi to advertise the app's presence to a paired device. It can do so statically and dynamically. When an app is on a node in a user's Wear network (i.e., on a phone, paired watch, or in the cloud), the CapabilityApi enables another app to detect if it is installed. For more information, see Advertise capabilities.

If one of your apps cannot detect the other, you can enable a user to open the Play Store listing on their remote device. This is a solution for watch apps that require their companion phone app's presence to function properly. A prerequisite is to check for the Play Store's presence on the remote device.

Note that not all phones support the Play Store (such as iPhones, etc.).

This section describes best practices for these scenarios:

Please review the sample that shows this functionality. For more information about the classes described below, see the Wear API Reference. Also in that reference is information about the PlayStoreAvailability class, which contains a getPlayStoreAvailabilityOnPhone() method that enables your Wear app to check if a companion phone has the Play Store.

Specifying capability names for detecting your apps

For the app corresponding to each device type (watch or phone), specify a unique string for the capability name in the res/values/wear.xml file.

For example, in your mobile module, the wear.xml file could include the following:

<resources>
    <string-array name="android_wear_capabilities">
        <item>verify_remote_example_phone_app</item>
    </string-array>
</resources>

In your wear module, the wear.xml file would include a different value for the capability name, such as the following:

<resources>
    <string-array name="android_wear_capabilities">
        <item>verify_remote_example_wear_app</item>
    </string-array>
</resources>

For more information, see Advertise capabilities.

App detection and opening a URL from a watch

Your watch app can detect if a user's companion phone has your phone app:

  1. Use the CapabilityApi to check if your phone app is installed on the paired phone. For more information, see the sample.
  2. If your phone app isn't installed on the phone, use the PlayStoreAvailability.getPlayStoreAvailabilityOnPhone() method to check the type of the phone.
  3. If PlayStoreAvailability.PLAY_STORE_ON_PHONE_AVAILABLE is returned, the phone is an Android phone with the Play Store installed. Call RemoteIntent.startRemoteActivity() on the Wear device to open the Play Store on the phone. Use the market URI for your phone app (which may be different from your phone URI). For example, use a market URI such as: market://details?id=com.example.android.wearable.wear.finddevices
  4. If PlayStoreAvailability.PLAY_STORE_ON_PHONE_UNAVAILABLE is returned, it means the phone is likely an iOS phone (with no Play Store available). Open the App Store on the iPhone by calling RemoteIntent.startRemoteActivity() on the Wear device. You can specify your app's iTunes URL, e.g., https://itunes.apple.com/us/app/yourappname. On an iPhone, from Android Wear, you cannot programmatically determine if your phone app is installed. As a best practice, provide a mechanism to the user (e.g., a button) to manually trigger the opening of the App Store.

Note that using the RemoteIntent API described above, you can specify that any URL be opened on the phone from the watch, and no phone app is required.

Details for detecting Play Store availability

Here is a snippet that uses the getPlayStoreAvailabilityOnPhone() method to check if the paired phone has the Play Store:

int playStoreAvailabilityOnPhone =
PlayStoreAvailability.getPlayStoreAvailabilityOnPhone(context);

The value returned by the getPlayStoreAvailabilityOnPhone() method is one of the following:

Return value Description
PLAY_STORE_ON_PHONE_AVAILABLE The Play Store is available on the companion phone.
PLAY_STORE_ON_PHONE_UNAVAILABLE The Play Store is not available on the companion phone.
PLAY_STORE_ON_PHONE_ERROR_UNKNOWN An error occurred in the check for the Play Store; another check should be made later.

App detection starting from an Android phone

Your Android phone can detect if a user's Wear devices have your watch app:

  1. Using the NodeApi, find all watches connected to the user's phone. For more information, see the sample.
  2. Using the CapabilityApi, check which of the user's watches have your app installed.
  3. If your app isn't installed on all of the user's watches (compare the results from Step 1 with the results from Step 2), allow the user to open the Play Store on the remaining Wear devices from the phone via the RemoteIntent.startRemoteActivity() method. Specifically, use the market URI for the Wear app (which may be different from your phone app's URI). For example, use a market URI such as: market://details?id=com.example.android.wearable.wear.finddevices

Location Data for Watches Paired to iPhones

For watches paired to iPhones, developers should use the Fused Location Provider (FLP) to get location data on a watch. See Detecting Location on Android Wear.

If the companion phone is available, FLP uses the companion phone for location data.

Obtaining Only the Necessary Data

Generally, when obtaining data from the internet, you should get only the necessary data. Otherwise, you may introduce unnecessary latency, memory use, and battery use.

When a watch is connected over a Bluetooth LE connection, your app may have access to a bandwidth of only 4 kilobytes per second, depending on the watch. Therefore, the following steps are recommended:

For cases where a high-bandwidth network is needed, see High-bandwidth Network Access.

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience.
(Sep 2017 survey)