belongs to Maven artifact com.android.support:wear:28.0.0-alpha1
MetadataConstants
public
class
MetadataConstants
extends Object
java.lang.Object | |
↳ | android.support.wear.utils.MetadataConstants |
Constants for android wear apps which are related to manifest meta-data.
Summary
Constants | |
---|---|
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. |
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. |
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. |
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. |
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. |
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. |
Public methods | |
---|---|
static
int
|
getPreviewDrawableResourceId(Context context, boolean circular)
|
static
boolean
|
isNotificationBridgingEnabled(Context context)
Determines whether a given context has notification bridging enabled. |
static
boolean
|
isStandalone(Context context)
Determines whether a given context comes from a standalone app. |
Inherited methods | |
---|---|
![]()
java.lang.Object
|
Constants
NOTIFICATION_BRIDGE_MODE_BRIDGING
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.
Constant Value: "BRIDGING"
NOTIFICATION_BRIDGE_MODE_METADATA_NAME
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
setLocalOnly(true)
.
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" />
Constant Value: "com.google.android.wearable.notificationBridgeMode"
NOTIFICATION_BRIDGE_MODE_NO_BRIDGING
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.
Constant Value: "NO_BRIDGING"
STANDALONE_METADATA_NAME
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