Skip to content

Update EngageWorker snippet to use V2 isServiceAvailable API#980

Open
amulyagaur wants to merge 11 commits into
android:mainfrom
amulyagaur:main
Open

Update EngageWorker snippet to use V2 isServiceAvailable API#980
amulyagaur wants to merge 11 commits into
android:mainfrom
amulyagaur:main

Conversation

@amulyagaur

Copy link
Copy Markdown

Updates the EngageWorker.kt snippet to use the new V2 version of isServiceAvailable API supporting ClusterType filtering.

@amulyagaur amulyagaur requested a review from a team as a code owner July 10, 2026 13:15
@google-cla

google-cla Bot commented Jul 10, 2026

Copy link
Copy Markdown

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.

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request updates EngageWorker.kt to perform service availability checks based on specific cluster types rather than a general check. However, the introduction of an else block that returns Result.failure() for unknown cluster types will break publishing for other valid types, such as user account management cards. It is recommended to remove this else block to prevent these failures.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread misc/src/main/java/com/example/snippets/engage/EngageWorker.kt
@yrezgui yrezgui requested a review from huewu July 10, 2026 13:29
@huewu

huewu commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Hi @amulyagaur,

Shouldn't we update the dependency version, as well? (1.5.2 > 1.6.0). Every code in the snippet should be compilable without error and warning. So, please double check it.

Thanks.

@amulyagaur amulyagaur left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Update Engage SDK Integration Skill snippets to use V2 isServiceAvailable API.

@amulyagaur

Copy link
Copy Markdown
Author

Hi @amulyagaur,

Shouldn't we update the dependency version, as well? (1.5.2 > 1.6.0). Every code in the snippet should be compilable without error and warning. So, please double check it.

Thanks.

Hi, Thanks for pointing this out. I have made the version changes.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants