Skip to content

[in_app_purchase_android] Add obfuscated profile ID purchase param#12080

Open
lianshumin wants to merge 3 commits into
flutter:mainfrom
lianshumin:add-obfuscated-profile-id
Open

[in_app_purchase_android] Add obfuscated profile ID purchase param#12080
lianshumin wants to merge 3 commits into
flutter:mainfrom
lianshumin:add-obfuscated-profile-id

Conversation

@lianshumin

Copy link
Copy Markdown

Adds an optional obfuscatedProfileId parameter to GooglePlayPurchaseParam
and passes it through to Google Play Billing's
BillingFlowParams.Builder.setObfuscatedProfileId().

This keeps the API Android-specific, since setObfuscatedProfileId() is a
Google Play Billing API and has no StoreKit equivalent. Existing behavior is
unchanged because the new parameter is optional.

Fixes flutter/flutter#130128

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2

@google-cla

google-cla Bot commented Jul 1, 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 adds support for passing an obfuscated profile ID (obfuscatedProfileId) in GooglePlayPurchaseParam for the Android in-app purchase implementation, propagating it to the billing flow parameters, and adding a corresponding unit test. The review feedback suggests documenting that obfuscatedProfileId requires applicationUserName to be specified, and updating the unit test to include both parameters for a more realistic scenario.

@lianshumin lianshumin force-pushed the add-obfuscated-profile-id branch from fb6cfd2 to ed03359 Compare July 1, 2026 09:40
@stuartmorgan-g

Copy link
Copy Markdown
Collaborator

Thanks for the contribution!

I don't see this in the PR. Please mark the PR as Ready for Review once this item has been completed.

@stuartmorgan-g stuartmorgan-g marked this pull request as draft July 7, 2026 18:14
@lianshumin lianshumin force-pushed the add-obfuscated-profile-id branch from ed03359 to fc8df97 Compare July 8, 2026 03:08
@lianshumin lianshumin marked this pull request as ready for review July 8, 2026 03:12

@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 adds support for passing an obfuscated profile ID (obfuscatedProfileId) in GooglePlayPurchaseParam for the Android implementation of the in-app purchase plugin. It updates buyNonConsumable to pass this parameter to the billing flow and adds a corresponding unit test. Feedback suggests adding a unit test to verify that an assertion error is thrown if obfuscatedProfileId is provided without applicationUserName.

@stuartmorgan-g stuartmorgan-g added the triage-android Should be looked at in Android triage label Jul 8, 2026
@stuartmorgan-g stuartmorgan-g requested a review from gmackall July 8, 2026 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p: in_app_purchase platform-android triage-android Should be looked at in Android triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[in_app_purchase] does not support passing ObfuscatedProfileId to BillingFlowParams

2 participants