BridgingManager

public class BridgingManager
extends Object

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


This class is deprecated.
Use androidx.wear.phone.interactions.notifications.BridgingManager from the Jetpack Wear Phone Interactions library instead.

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

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()

Public methods

fromContext

public static BridgingManager fromContext (Context context)

Parameters
context Context

Returns
BridgingManager

setConfig

public void setConfig (BridgingConfig bridgingConfig)

Sets the BridgingConfig object.

Parameters
bridgingConfig BridgingConfig: The BridgingConfig object.