Skip to content

[in_app_purchase_android] Add obfuscated profile ID support#12079

Open
yuqi wants to merge 2 commits into
flutter:mainfrom
joyread:in_app_purchase_android-obfuscated-profile-id
Open

[in_app_purchase_android] Add obfuscated profile ID support#12079
yuqi wants to merge 2 commits into
flutter:mainfrom
joyread:in_app_purchase_android-obfuscated-profile-id

Conversation

@yuqi

@yuqi yuqi commented Jul 1, 2026

Copy link
Copy Markdown

As mentioned in #130128, Google Play Billing supports passing an obfuscated profile ID in addition to an obfuscated account ID.

This adds an Android-specific obfuscatedProfileId parameter to GooglePlayPurchaseParam, and passes it through to the Play Billing flow.

final purchaseParam = GooglePlayPurchaseParam(
  productDetails: productDetails,
  applicationUserName: hashedAccountId,
  obfuscatedProfileId: hashedProfileId,
);

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 obfuscatedProfileId in the Android implementation of the in_app_purchase plugin. Specifically, it introduces the obfuscatedProfileId parameter to GooglePlayPurchaseParam, passes it through buyNonConsumable in InAppPurchaseAndroidPlatform, and updates the corresponding unit tests to verify its serialization and transmission. There are no review comments, and I have no feedback to provide.

@yuqi yuqi force-pushed the in_app_purchase_android-obfuscated-profile-id branch from 8cc9383 to 6b4e32b Compare July 1, 2026 08:27
yuqi added 2 commits July 2, 2026 09:20
Adds an Android-specific `obfuscatedProfileId` parameter to `GooglePlayPurchaseParam`, and passes it through to the Play Billing flow.

Adds test coverage for passing account and profile identifiers through the platform purchase API.
Keeps the new release entry consistent with nearby in_app_purchase_android changelog formatting.
@yuqi yuqi force-pushed the in_app_purchase_android-obfuscated-profile-id branch from 94bee43 to 13bd176 Compare July 2, 2026 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[in_app_purchase] does not support passing ObfuscatedProfileId to BillingFlowParams

1 participant