Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.

BridgingManager

public class BridgingManager
extends Object

java.lang.Object
   ↳ android.support.wearable.notifications.BridgingManager


APIs to enable/disable notification bridging.

Example usages:

  • Disable bridging at runtime:
    BridgingManager.fromContext(context).setConfig(
         new BridgingConfig.Builder(context, false)
             .build());
     
  • Disable bridging at runtime except for the tags "foo" and "bar":
    BridgingManager.fromContext(context).setConfig(
         new BridgingConfig.Builder(context, false)
             .addExcludedTag("foo")
             .addExcludedTag("bar")
             .build());
     
  • Disable bridging at runtime except for the tags "foo" and "bar" and "baz":
    BridgingManager.fromContext(context).setConfig(
         new BridgingConfig.Builder(context, false)
             .addExcludedTags(Arrays.asList("foo", "bar", "baz"))
             .build());
     
  • Adding a bridge tag to a notification posted on a phone:
    NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(context)
     // ... set other fields ...
         .extend(
             new NotificationCompat.WearableExtender()
                 .setBridgeTag("foo"));
     Notification notification = notificationBuilder.build();
     

Summary

Public methods

static BridgingManager fromContext(Context context)
void setConfig(BridgingConfig bridgingConfig)

Sets the BridgingConfig object.

Inherited methods

From class java.lang.Object

Public methods

fromContext

BridgingManager fromContext (Context context)

Parameters
context Context

Returns
BridgingManager

setConfig

void setConfig (BridgingConfig bridgingConfig)

Sets the BridgingConfig object.

Parameters
bridgingConfig BridgingConfig: The BridgingConfig object.