Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Add an API to enable/disable delivering messages when the region goes inactive - #5696

Merged
zugaldia merged 1 commit into
masterfrom
5538-messages
Jul 14, 2016
Merged

zugaldia merged 1 commit into
masterfrom
5538-messages

Conversation

@zugaldia

@zugaldia zugaldia commented Jul 14, 2016 •

Copy link
Copy Markdown
Member

This PR adds a new API to the OfflineRegion object to enable or disable the delivery of messages once a region state is set as STATE_INACTIVE. Note that it doesn't change the internal state of the region, this only changes whether the callback will emit or not notifications.

From now on, by default, the API won't provide updates when a region is set inactive although this behavior can be changed via OfflineRegion.setDeliverInactiveMessages(true).

/cc: @danswick @1ec5

This handles the Android side of #5538.

@zugaldia zugaldia added Android Mapbox Maps SDK for Android offline labels Jul 14, 2016
@zugaldia zugaldia added this to the android-v4.2.0 milestone Jul 14, 2016
@1ec5

1ec5 commented Jul 14, 2016

Copy link
Copy Markdown
Contributor

There’s nothing inherently platform-specific about this approach, is there? I think suppressing updates is something mbgl should be responsible for rather than every SDK individually.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds grammatically incorrect. Is it necessary to say “isDeliver” here instead of “isDelivering” or “delivers”?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an artifact of how the IDE generate getters for booleans, I like isDeliveringInactiveMessages() better too.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Android Mapbox Maps SDK for Android offline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants