firebase-admin-java icon indicating copy to clipboard operation
firebase-admin-java copied to clipboard

Add support for new bandwidthConstrainedOk flag used to deliver notifications to satellite networks

Open andrew-signal opened this issue 2 months ago • 1 comments

Discussion

Hi! The Android Developers page for Developing for constrained satellite networks indicates that we need to pass a new flag, bandwidth_constrained_ok in our AndroidConfig options, like so, to ensure delivery of our pushes on constrained satellite networks.

{
  "message":{
    "token":"bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1...",
    "notification":{
      "title":"Portugal vs. Denmark",
      "body":"great match!"
    }
    "android": {
       "bandwidth_constrained_ok": true
    }
  }
}

In order to do this in a server app based on the firebase-admin-java SDK, we need to expose a config option in AndroidConfigBuilder.

(In practice, things seem to be okay without this flag, but the documentation says we should add it, so I'm inclined to add it.)

Testing

  • I added a new unit test to match the already extant one for direct_boot_ok.
  • mvn test passes locally on my machine.
  • I expect CI will also run on this PR.

API Changes

  • This does add the minimal new config parameter to set this parameter in AndroidConfigBuilder, which is the least intrusive change I can make to the public API to expose this now-needed functionality.

andrew-signal avatar Oct 17 '25 03:10 andrew-signal

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

google-cla[bot] avatar Oct 17 '25 03:10 google-cla[bot]