Stay organized with collections
Save and categorize content based on your preferences.
BridgingManager
public
class
BridgingManager
extends Object
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
Inherited methods |
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()
|
|
Public methods
setConfig
public void setConfig (BridgingConfig bridgingConfig)
Sets the BridgingConfig object.
Parameters |
bridgingConfig |
BridgingConfig : The BridgingConfig object.
|
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# BridgingManager\n\nSummary: [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nBridgingManager\n===============\n\n\n`\npublic\n\n\nclass\nBridgingManager\n`\n\n\n`\n\nextends `[Object](http://developer.android.com/reference/java/lang/Object.html)`\n\n\n`\n\n`\n\n\n`\n\n|---|--------------------------------------------------------|\n| [java.lang.Object](http://developer.android.com/reference/java/lang/Object.html) ||\n| ↳ | android.support.wearable.notifications.BridgingManager |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n\n**This class is deprecated.** \n\nUse `androidx.wear.phone.interactions.notifications.BridgingManager` from the\n[Jetpack Wear Phone Interactions](../../../../../jetpack/androidx/releases/wear)\nlibrary instead.\n\nAPIs to enable/disable notification bridging.\n\nExample usages:\n\n- Disable bridging at runtime: \n\n BridgingManager.fromContext(context).setConfig(\n new BridgingConfig.Builder(context, false)\n .build());\n \n- Disable bridging at runtime except for the tags \"foo\" and \"bar\": \n\n BridgingManager.fromContext(context).setConfig(\n new BridgingConfig.Builder(context, false)\n .addExcludedTag(\"foo\")\n .addExcludedTag(\"bar\")\n .build());\n \n- Disable bridging at runtime except for the tags \"foo\" and \"bar\" and \"baz\": \n\n BridgingManager.fromContext(context).setConfig(\n new BridgingConfig.Builder(context, false)\n .addExcludedTags(Arrays.asList(\"foo\", \"bar\", \"baz\"))\n .build());\n \n- Adding a bridge tag to a notification posted on a phone: \n\n NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(context)\n // ... set other fields ...\n .extend(\n new NotificationCompat.WearableExtender()\n .setBridgeTag(\"foo\"));\n Notification notification = notificationBuilder.build();\n \n\u003cbr /\u003e\n\n**See also:**\n\n- [BridgingConfig.Builder.addExcludedTag(String)](../../../../../reference/android/support/wearable/notifications/BridgingConfig.Builder.html#addExcludedTag(java.lang.String))\n- [BridgingConfig.Builder.addExcludedTags(Collection)](../../../../../reference/android/support/wearable/notifications/BridgingConfig.Builder.html#addExcludedTags(java.util.Collection\u003cjava.lang.String\u003e))\n- [NotificationCompat.WearableExtender.setBridgeTag(String)](../../../../../reference/androidx/core/app/NotificationCompat.WearableExtender.html#setBridgeTag(java.lang.String))\n\nSummary\n-------\n\n| ### Public methods ||\n|-------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` static `[BridgingManager](../../../../../reference/android/support/wearable/notifications/BridgingManager.html) | ` `[fromContext](../../../../../reference/android/support/wearable/notifications/BridgingManager.html#fromContext(android.content.Context))`(`[Context](http://developer.android.com/reference/android/content/Context.html)` context) ` |\n| ` void` | ` `[setConfig](../../../../../reference/android/support/wearable/notifications/BridgingManager.html#setConfig(android.support.wearable.notifications.BridgingConfig))`(`[BridgingConfig](../../../../../reference/android/support/wearable/notifications/BridgingConfig.html)` bridgingConfig) ` Sets the BridgingConfig object. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` `[java.lang.Object](http://developer.android.com/reference/java/lang/Object.html)` ` |------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------| | ` `[Object](http://developer.android.com/reference/java/lang/Object.html) | ` clone() ` | | ` boolean` | ` equals(`[Object](http://developer.android.com/reference/java/lang/Object.html)` arg0) ` | | ` void` | ` finalize() ` | | ` final `[Class](http://developer.android.com/reference/java/lang/Class.html)`\u003c?\u003e` | ` getClass() ` | | ` int` | ` hashCode() ` | | ` final void` | ` notify() ` | | ` final void` | ` notifyAll() ` | | ` `[String](http://developer.android.com/reference/java/lang/String.html) | ` toString() ` | | ` final void` | ` wait(long arg0, int arg1) ` | | ` final void` | ` wait(long arg0) ` | | ` final void` | ` wait() ` | ||\n\nPublic methods\n--------------\n\n### fromContext\n\n```\npublic static BridgingManager fromContext (Context context)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-----------|------------------|\n| `context` | `Context` \u003cbr /\u003e |\n\n| Returns ||\n|---------------------------------------------------------------------------------------------------------|--------|\n| [BridgingManager](../../../../../reference/android/support/wearable/notifications/BridgingManager.html) | \u003cbr /\u003e |\n\n### setConfig\n\n```\npublic void setConfig (BridgingConfig bridgingConfig)\n```\n\nSets the BridgingConfig object.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------------|-----------------------------------------------------|\n| `bridgingConfig` | `BridgingConfig`: The BridgingConfig object. \u003cbr /\u003e |"]]