Upgrade Engage SDK to 1.6.0 and refactor service availability calls to use the new conditional service availability syntax - #5764
Conversation
|
|
| val availabilityMap = client.isServiceAvailable(request).await() | ||
| availabilityMap[clusterType] == true | ||
| } catch (e: Throwable) { | ||
| Timber.tag(TAG).d(e, "Failed to check service availability for '$type' cluster.") |
There was a problem hiding this comment.
Thanks for making this change. I'm having a bit of trouble testing it. It's giving me the following error. Any ideas what I might be doing wrong?
Engage SDK service is not avaialable. Failing 'Recommendations' cluster sync.
Engage SDK service is not avaialable. Failing 'Continuation' cluster sync.
Engage SDK service is not avaialable. Failing 'Featured' cluster sync.
|
Would you mind signing the open source Contributor License Agreement above? |
Hey @geekygecko , I have already signed the agreement twice, but the system does not seems to take that into account. Is there any known issue for the same? |
The commits are coming from another user, @amulyagaur-commits. Is it possible to sign the CLA with this user?
Do you have any advice on how to test this? I can't see the clusters in the Play Engage Verify App. |
If you want to see the clusters in verify app, Please make the following changes -
|
Description
Unlock "Always On" Content Publishing for selected content types with Engage SDK v1.6.0
Background & Changes
This PR upgrades the Google Play Engage SDK from
1.5.12to1.6.0to adopt Conditional Service Availability.Previously,
client.isServiceAvailableperformed a generic, binary check across all cluster types. With Engage SDK v1.6.0, apps can pass aServiceAvailabilityRequestwith specific intended cluster types (ClusterType.TYPE_CONTINUATION,ClusterType.TYPE_RECOMMENDATION,ClusterType.TYPE_FEATURED, andClusterType.TYPE_ENGAGEMENT).This allows lightweight, user-action-driven content like Continue Listening (
TYPE_CONTINUATION) and account data (TYPE_ENGAGEMENT) to remain "Always On" and up-to-date, while keeping heavier recommendation feeds on optimized intermittent schedules.Summary of Changes:
engage-coreto1.6.0ingradle/libs.versions.toml.ClusterSyncWorkerto build aServiceAvailabilityRequestmatching the specific cluster type (Recommendations,Continuation,Featured) before triggering cluster sync.EngageSdkAccountSyncto passServiceAvailabilityRequestwithClusterType.TYPE_ENGAGEMENTbefore updating user account metadata.More details here - https://developer.android.com/guide/playcore/engage/listen#for_engage_sdk_v160_and_higher_recommended
Testing Instructions
FeaturedWorkerandRecommendationsSyncWorker.ContinuationSyncWorker.adb logcat | grep -i Engage) to verify thatisServiceAvailable()evaluates successfully for the intended cluster types and all sync operations complete cleanly.Screenshots or Screencast
NA (Non-UI background integration)
Checklist
./gradlew spotlessApplyto automatically apply formatting/linting)modules/services/localization/src/main/res/values/strings.xmlI have tested any UI changes...
NA