added in [version 27.1.0](https://developer.android.com/topic/libraries/support-library/revisions)   
belongs to Maven artifact com.android.support:wear:28.0.0-alpha1 Summary: [Constants](https://developer.android.com/reference/android/support/wear/utils/MetadataConstants#constants) \| [Methods](https://developer.android.com/reference/android/support/wear/utils/MetadataConstants#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/support/wear/utils/MetadataConstants#inhmethods) \| [\[Expand All\]](https://developer.android.com/reference/android/support/wear/utils/MetadataConstants#)

# MetadataConstants

| This package is part of the Android [support library](https://developer.android.com/topic/libraries/support-library) which is no longer maintained. The support library has been superseded by [AndroidX](https://developer.android.com/jetpack/androidx) which is part of [Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider [migrating](https://developer.android.com/jetpack/androidx/migrate) existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library [class
| mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).


`
public


class
MetadataConstants
`


`

extends Object


`

`


`

|---|---|
| java.lang.Object ||
| ↳ | android.support.wear.utils.MetadataConstants |

<br />

*** ** * ** ***

Constants for android wear apps which are related to manifest meta-data.

## Summary

| ### Constants ||
|---|---|
| `String` | `https://developer.android.com/reference/android/support/wear/utils/MetadataConstants#NOTIFICATION_BRIDGE_MODE_BRIDGING` The value of the notification bridge mode meta-data element in the case where the Wear app wants notifications to be bridged from the phone to the wearable. |
| `String` | `https://developer.android.com/reference/android/support/wear/utils/MetadataConstants#NOTIFICATION_BRIDGE_MODE_METADATA_NAME` We support specifying whether notifications should be bridged from the phone to the wearable in the Wear app manifest file. |
| `String` | `https://developer.android.com/reference/android/support/wear/utils/MetadataConstants#NOTIFICATION_BRIDGE_MODE_NO_BRIDGING` The value of the notification bridge mode meta-data element in the case where the Wear app does not want notifications to be bridged from the phone to the wearable. |
| `String` | `https://developer.android.com/reference/android/support/wear/utils/MetadataConstants#STANDALONE_METADATA_NAME` The name of the meta-data element in the Wear app manifest for specifying whether this app does not require a companion phone app. |
| `String` | `https://developer.android.com/reference/android/support/wear/utils/MetadataConstants#WATCH_FACE_PREVIEW_CIRCULAR_METADATA_NAME` The name of the meta-data element in the watch face service manifest declaration used to assign a circular preview image to the watch face. |
| `String` | `https://developer.android.com/reference/android/support/wear/utils/MetadataConstants#WATCH_FACE_PREVIEW_METADATA_NAME` The name of the meta-data element in the watch face service manifest declaration used to assign a non-circular preview image to the watch face. |

| ### Public methods ||
|---|---|
| ` static int` | ` https://developer.android.com/reference/android/support/wear/utils/MetadataConstants#getPreviewDrawableResourceId(android.content.Context, boolean)(https://developer.android.com/reference/android/content/Context.html context, boolean circular) ` |
| ` static boolean` | ` https://developer.android.com/reference/android/support/wear/utils/MetadataConstants#isNotificationBridgingEnabled(android.content.Context)(https://developer.android.com/reference/android/content/Context.html context) ` Determines whether a given context has notification bridging enabled. |
| ` static boolean` | ` https://developer.android.com/reference/android/support/wear/utils/MetadataConstants#isStandalone(android.content.Context)(https://developer.android.com/reference/android/content/Context.html context) ` Determines whether a given context comes from a standalone app. |

| ### Inherited methods |
|---|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/wear/utils/MetadataConstants#)From class ` java.lang.Object ` |---|---| | ` Object` | ` clone() ` | | ` boolean` | ` equals(Object arg0) ` | | ` void` | ` finalize() ` | | ` final Class<?>` | ` getClass() ` | | ` int` | ` hashCode() ` | | ` final void` | ` notify() ` | | ` final void` | ` notifyAll() ` | | ` String` | ` toString() ` | | ` final void` | ` wait(long arg0, int arg1) ` | | ` final void` | ` wait(long arg0) ` | | ` final void` | ` wait() ` | ||

## Constants

### NOTIFICATION_BRIDGE_MODE_BRIDGING

added in [version 27.1.0](https://developer.android.com/topic/libraries/support-library/revisions)

```
String NOTIFICATION_BRIDGE_MODE_BRIDGING
```

The value of the notification bridge mode meta-data element in the case where the Wear app
wants notifications to be bridged from the phone to the wearable.

<br />

Constant Value:

"BRIDGING"


### NOTIFICATION_BRIDGE_MODE_METADATA_NAME

added in [version 27.1.0](https://developer.android.com/topic/libraries/support-library/revisions)

```
String NOTIFICATION_BRIDGE_MODE_METADATA_NAME
```

We support specifying whether notifications should be bridged from the phone to the wearable
in the Wear app manifest file. Simply add a meta-data element to the Wear app manifest with
the name "com.google.android.wearable.notificationBridgeMode" and either the value
NO_BRIDGING or the value BRIDGING. If you choose not to update your Wear app manifest, then
notifications will be bridged by default from the phone to the wearable.

NO_BRIDGING means that phone notifications will not be bridged to the wearable if the
wearable app is installed.

BRIDGING means that phone notifications will be bridged to the wearable, unless they are
posted with
`https://developer.android.com/reference/android/app/Notification.Builder.html#setLocalOnly(boolean)`.

Example AndroidManifest.xml meta-data element for NO_BRIDGING:

    <meta-data
         android:name="com.google.android.wearable.notificationBridgeMode"
         android:value="NO_BRIDGING" />
     
Example AndroidManifest.xml meta-data element for BRIDGING:

    <meta-data
         android:name="com.google.android.wearable.notificationBridgeMode"
         android:value="BRIDGING" />
     
<br />

<br />

Constant Value:

"com.google.android.wearable.notificationBridgeMode"


### NOTIFICATION_BRIDGE_MODE_NO_BRIDGING

added in [version 27.1.0](https://developer.android.com/topic/libraries/support-library/revisions)

```
String NOTIFICATION_BRIDGE_MODE_NO_BRIDGING
```

The value of the notification bridge mode meta-data element in the case where the Wear app
does not want notifications to be bridged from the phone to the wearable.

<br />

Constant Value:

"NO_BRIDGING"


### STANDALONE_METADATA_NAME

added in [version 27.1.0](https://developer.android.com/topic/libraries/support-library/revisions)

```
String STANDALONE_METADATA_NAME
```

The name of the meta-data element in the Wear app manifest for specifying whether this app
does not require a companion phone app. The value should be set to "true" or "false".


Wear apps that do not require a phone side companion app to function can declare this in
their AndroidManifest.xml file by setting the standalone meta-data element to true as shown
in the following example. If this value is true, all users can discover this app regardless
of what phone they have. If this value is false (or not set), only users with compatible
Android phones can discover this app.


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

<br />

Constant Value:

"com.google.android.wearable.standalone"


### WATCH_FACE_PREVIEW_CIRCULAR_METADATA_NAME

added in [version 27.1.0](https://developer.android.com/topic/libraries/support-library/revisions)

```
String WATCH_FACE_PREVIEW_CIRCULAR_METADATA_NAME
```

The name of the meta-data element in the watch face service manifest declaration used
to assign a circular preview image to the watch face. The value should be set to
a drawable reference.

```transact-sql
 <meta-data
     android:name="com.google.android.wearable.watchface.preview_circular"
     android:resource="@drawable/preview_face_circular" />
 
```

<br />

<br />

Constant Value:

"com.google.android.wearable.watchface.preview_circular"


### WATCH_FACE_PREVIEW_METADATA_NAME

added in [version 27.1.0](https://developer.android.com/topic/libraries/support-library/revisions)

```
String WATCH_FACE_PREVIEW_METADATA_NAME
```

The name of the meta-data element in the watch face service manifest declaration used
to assign a non-circular preview image to the watch face. The value should be set to
a drawable reference.

```transact-sql
 <meta-data
     android:name="com.google.android.wearable.watchface.preview"
     android:resource="@drawable/preview_face" />
 
```

<br />

<br />

Constant Value:

"com.google.android.wearable.watchface.preview"


## Public methods

### getPreviewDrawableResourceId

added in [version 27.1.0](https://developer.android.com/topic/libraries/support-library/revisions)

```
int getPreviewDrawableResourceId (Context context, 
                boolean circular)
```

<br />

<br />

| Parameters ||
|---|---|
| `context` | `Context`: to be evaluated. <br /> |
| `circular` | `boolean`: Whether to return the circular or regular preview. <br /> |

| Returns ||
|---|---|
| `int` | an integer id representing the resource id of the requested drawable, or 0 if no drawable was found. <br /> |

### isNotificationBridgingEnabled

added in [version 27.1.0](https://developer.android.com/topic/libraries/support-library/revisions)

```
boolean isNotificationBridgingEnabled (Context context)
```

Determines whether a given context has notification bridging enabled.

<br />

| Parameters ||
|---|---|
| `context` | `Context`: to be evaluated. <br /> |

| Returns ||
|---|---|
| `boolean` | Whether a given context has notification bridging enabled. <br /> |

### isStandalone

added in [version 27.1.0](https://developer.android.com/topic/libraries/support-library/revisions)

```
boolean isStandalone (Context context)
```

Determines whether a given context comes from a standalone app. This can be used as a proxy
to check if any given app is compatible with iOS Companion devices.

<br />

| Parameters ||
|---|---|
| `context` | `Context`: to be evaluated. <br /> |

| Returns ||
|---|---|
| `boolean` | Whether a given context comes from a standalone app. <br /> |

-

  ## Classes

  - [MetadataConstants](https://developer.android.com/reference/android/support/wear/utils/MetadataConstants)