Skip to content

[in_app_purchase_android] Add showInAppMessages support (#107412) - #11214

Merged
auto-submit[bot] merged 1 commit into
flutter:mainfrom
riverolls:in_app_purchase_android
Jun 12, 2026
Merged

[in_app_purchase_android] Add showInAppMessages support (#107412)#11214
auto-submit[bot] merged 1 commit into
flutter:mainfrom
riverolls:in_app_purchase_android

Conversation

@fingerart

@fingerartfingerart commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

As mentioned in #107412, a new native feature (showInAppMessages) has been added.

final androidPlatformAddition =InAppPurchase.instance.getPlatformAddition<InAppPurchaseAndroidPlatformAddition>();
final result =await androidPlatformAddition.showInAppMessages();

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

@gemini-code-assistgemini-code-assistBot 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 the showInAppMessages API from the Google Play Billing Library. This includes defining the new API in Pigeon, implementing it on the Android native side, adding Dart wrappers, and updating the example app to demonstrate its usage. Tests for the new functionality have also been added.

@fingerart

Copy link
Copy Markdown
ContributorAuthor

@stuartmorgan-g@GaryQian What else do I need to do?

@stuartmorgan-g

Copy link
Copy Markdown
Collaborator

@fingerart You need to wait for a review, which as our docs explain takes up to a couple of weeks.

@stuartmorgan-gstuartmorgan-g added the triage-android Should be looked at in Android triage label Mar 10, 2026
@fingerart

Copy link
Copy Markdown
ContributorAuthor

There are 6 failed checks, what do I need to do about it?

@stuartmorgan-g

Copy link
Copy Markdown
Collaborator

There are 6 failed checks, what do I need to do about it?

You can see the task output by going to View details -> View more details on flutter-dashboard -> stdout.

In this case they are all analyzer failures, which should trivially show up locally in any IDE configured to read repo-local analysis options.

@fingerart
fingerartforce-pushed the in_app_purchase_android branch from 8d3a9cc to 410fa60CompareApril 2, 2026 02:12
@fingerart

Copy link
Copy Markdown
ContributorAuthor

I have fixed the error checking item.

@jesswrdjesswrd added the CICD Run CI/CD label Apr 7, 2026

@gmackallgmackall left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Mostly lgtm, one question about future proofing re: the categories of message to show.

Also, it would be good to add a test to packages/in_app_purchase/in_app_purchase_android/test/in_app_purchase_android_platform_addition_test.dart as the other methods of in_app_purchase_android_platform_addition.dart are also tested there

something like

group('showInAppMessages', () {
test('showInAppMessages success', () async {
const expected =InAppMessageResultWrapper(
responseCode:InAppMessageResponse.subscriptionStatusUpdated,
purchaseToken:'dummy purchase token',
);
when(mockApi.showInAppMessages()).thenAnswer(
(_) async=>PlatformInAppMessageResult(
responseCode:PlatformInAppMessageResponse.subscriptionStatusUpdated,
purchaseToken: expected.purchaseToken,
),
);
finalInAppMessageResultWrapper result =await iapAndroidPlatformAddition.showInAppMessages();
expect(result, equals(expected));
});
});

@fingerart
fingerartforce-pushed the in_app_purchase_android branch from 410fa60 to 3200139CompareApril 15, 2026 03:29
@github-actionsgithub-actionsBot removed the CICD Run CI/CD label Apr 15, 2026
@fingerart

Copy link
Copy Markdown
ContributorAuthor

I added the showInAppMessages success test to packages/in_app_purchase/in_app_purchase_android/test/in_app_purchase_android_platform_addition_test.dart.

@gmackall

Copy link
Copy Markdown
Member

lgtm, @bparrishMines would you like to do the secondary review?

@gmackallgmackall removed the triage-android Should be looked at in Android triage label Apr 21, 2026
@bparrishMinesbparrishMines added the CICD Run CI/CD label Apr 29, 2026

@bparrishMinesbparrishMines 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.

LGTM with a couple nits

Comment threadpackages/in_app_purchase/in_app_purchase_android/pigeons/messages.dart Outdated
@github-actionsgithub-actionsBot removed the CICD Run CI/CD label Apr 30, 2026
@fingerart
fingerartforce-pushed the in_app_purchase_android branch from c72c1f7 to 2e060b6CompareApril 30, 2026 07:21
@bparrishMines

Copy link
Copy Markdown
Contributor

@fingerart This needs to merge in the main branch and handle merging the pigeon Kotlin update. This PR doesn't allow maintainers to make changes, so I can't do this for you.

@fingerart
fingerartforce-pushed the in_app_purchase_android branch 2 times, most recently from 2e060b6 to db93292CompareMay 20, 2026 04:12
@fingerart

Copy link
Copy Markdown
ContributorAuthor

@bparrishMines I have updated to Kotlin.

@bparrishMinesbparrishMines added the CICD Run CI/CD label May 22, 2026

@bparrishMinesbparrishMines 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.

This looks good. I think the version bump got messed up with the kotlin merge. The pubspec version needs to updated along with my comments in the changelog.

Comment threadpackages/in_app_purchase/in_app_purchase_android/CHANGELOG.md Outdated
Comment threadpackages/in_app_purchase/in_app_purchase_android/CHANGELOG.md Outdated
@fingerart
fingerartforce-pushed the in_app_purchase_android branch from db93292 to 503ead0CompareMay 22, 2026 18:04
@github-actionsgithub-actionsBot removed the CICD Run CI/CD label May 22, 2026
Comment threadpackages/in_app_purchase/in_app_purchase_android/CHANGELOG.md Outdated
Comment threadpackages/in_app_purchase/in_app_purchase_android/pubspec.yaml Outdated
@fingerart
fingerartforce-pushed the in_app_purchase_android branch 3 times, most recently from 22ae8f4 to cdc35c7CompareJune 2, 2026 06:56
@bparrishMinesbparrishMines added the CICD Run CI/CD label Jun 3, 2026
@flutter-dashboard

Copy link
Copy Markdown

This pull request is not mergeable in its current state, likely because of a merge conflict. Pre-submit CI jobs were not triggered. Pushing a new commit to this branch that resolves the issue will result in pre-submit jobs being scheduled.

@bparrishMinesbparrishMines 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.

LGTM

@fingerart
fingerartforce-pushed the in_app_purchase_android branch from cdc35c7 to ba97bc9CompareJune 4, 2026 06:28
@github-actionsgithub-actionsBot removed the CICD Run CI/CD label Jun 4, 2026
@fingerart
fingerartforce-pushed the in_app_purchase_android branch from ba97bc9 to 8b3523eCompareJune 4, 2026 06:32
@bparrishMinesbparrishMines added the CICD Run CI/CD label Jun 4, 2026
@fingerart
fingerartforce-pushed the in_app_purchase_android branch from 8b3523e to 5eac845CompareJune 5, 2026 04:06
@github-actionsgithub-actionsBot removed the CICD Run CI/CD label Jun 5, 2026
@fingerart
fingerartforce-pushed the in_app_purchase_android branch from 5eac845 to 58b8b2cCompareJune 8, 2026 02:00
@fingerart
fingerartforce-pushed the in_app_purchase_android branch from 58b8b2c to ee3e06aCompareJune 11, 2026 06:39
@bparrishMinesbparrishMines added the CICD Run CI/CD label Jun 11, 2026
@fingerart

Copy link
Copy Markdown
ContributorAuthor

Do I need to manually update the branch (rebase) to complete the merge?

@bparrishMinesbparrishMines added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 12, 2026
@bparrishMines

bparrishMines commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

I was just waiting on the tree to be green before I added the autosubmit label. It should land soon.

@auto-submit
auto-submitBot merged commit a5de740 into flutter:mainJun 12, 2026
87 checks passed
@fingerart
fingerart deleted the in_app_purchase_android branch June 13, 2026 03:53
pullBot pushed a commit to Mattlk13/flutter that referenced this pull request Jun 15, 2026
…r#188021)
flutter/packages@b78ad83...aa964a3
2026-06-15 44747303+theprantadutta@users.noreply.github.com
[path_provider] Document null vs UnsupportedError return semantics
(flutter/packages#11793)
2026-06-15 49699333+dependabot[bot]@users.noreply.github.com Bump
lewagon/wait-on-check-action from 1.7.0 to 1.8.0 in the
all-github-actions group (flutter/packages#11906)
2026-06-12 stuartmorgan@google.com [cupertino_ui,material_ui] Import
from flutter/flutter (flutter/packages#11888)
2026-06-12 engine-flutter-autoroll@skia.org Roll Flutter (stable) from
924134a to c9a6c48 (8 revisions) (flutter/packages#11893)
2026-06-12 engine-flutter-autoroll@skia.org Roll Flutter from
8bdce07 to b7cb925 (21 revisions) (flutter/packages#11892)
2026-06-12 fingerart.me@gmail.com [in_app_purchase_android] Add
showInAppMessages support (flutter#107412) (flutter/packages#11214)
2026-06-12 spkhalad@gmail.com [webview_flutter] Implement getCookies
(flutter/packages#10833)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com on the revert to ensure that a
human
is aware of the problem.
To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose
To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
via-guy pushed a commit to via-guy/flutter that referenced this pull request Jun 26, 2026
…r#188021)
flutter/packages@b78ad83...aa964a3
2026-06-15 44747303+theprantadutta@users.noreply.github.com
[path_provider] Document null vs UnsupportedError return semantics
(flutter/packages#11793)
2026-06-15 49699333+dependabot[bot]@users.noreply.github.com Bump
lewagon/wait-on-check-action from 1.7.0 to 1.8.0 in the
all-github-actions group (flutter/packages#11906)
2026-06-12 stuartmorgan@google.com [cupertino_ui,material_ui] Import
from flutter/flutter (flutter/packages#11888)
2026-06-12 engine-flutter-autoroll@skia.org Roll Flutter (stable) from
924134a to c9a6c48 (8 revisions) (flutter/packages#11893)
2026-06-12 engine-flutter-autoroll@skia.org Roll Flutter from
8bdce07 to b7cb925 (21 revisions) (flutter/packages#11892)
2026-06-12 fingerart.me@gmail.com [in_app_purchase_android] Add
showInAppMessages support (flutter#107412) (flutter/packages#11214)
2026-06-12 spkhalad@gmail.com [webview_flutter] Implement getCookies
(flutter/packages#10833)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com on the revert to ensure that a
human
is aware of the problem.
To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose
To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmitMerge PR when tree becomes green via auto submit AppCICDRun CI/CDp: in_app_purchaseplatform-android

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@fingerart@stuartmorgan-g@gmackall@bparrishMines@jesswrd