Skip to content

Conversation

aradhwan
Copy link

What

  • Replace deprecated PackageManager#getInstallerPackageName(String) with
    PackageManager#getInstallSourceInfo(String).getInstallingPackageName() on API 30+,
    with a legacy fallback for <30.
  • No Dart/API changes. No Gradle changes.

Why

How I tested

  • Ran flutter analyze – no issues.
  • Built the example app on Android (SDK 34): the “uses or overrides a deprecated API” note referencing InAppReviewPlugin.java no longer appears.

Risk

  • Low. Behavior preserved; guarded by runtime SDK check; falls back to the legacy call on older devices.

Closes #148 #151 #155 #165.

@britannio
Copy link
Owner

Thanks for the PR, I figured that a simpler solution is to avoid even checking the install source so I'm closing this in favour of
#167

@britannio britannio closed this Aug 27, 2025
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.

Android getInstallerPackageName Deprecated Warning

2 participants