Skip to content

Skip Google Play in-app update check for non-Google Play installs#206

Draft
aveao wants to merge 2 commits into
coredevices:masterfrom
aveao:no-play-update-check
Draft

Skip Google Play in-app update check for non-Google Play installs#206
aveao wants to merge 2 commits into
coredevices:masterfrom
aveao:no-play-update-check

Conversation

@aveao
Copy link
Copy Markdown
Contributor

@aveao aveao commented May 20, 2026

Nicety for #184. It's harmless but no point in checking and no point in resulting scary logs if it isn't installed through gplay.

@aveao aveao marked this pull request as ready for review May 21, 2026 07:01
Copy link
Copy Markdown
Member

@sjp4 sjp4 left a comment

Choose a reason for hiding this comment

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

Do you think there's any risk this doesn't work? The code looks sensible, but unfortunately it's an epic pain to test this flow (creating a dedicated build, sending that to the play store on a special internal channel, installing it, publishing an update, etc, etc) so I'm kinda scared to touch it.

@aveao
Copy link
Copy Markdown
Contributor Author

aveao commented May 22, 2026

What if we first merge a debug line that just logs what it's installed through, then a release or two later we merge this?

@sjp4
Copy link
Copy Markdown
Member

sjp4 commented May 22, 2026

That should work

Resolve the installer package (getInstallSourceInfo on API 30+, the
deprecated getInstallerPackageName below it; null on failure) and log it
as debug at the start of the update check flow, instead of blocking the
Play update check for non-Play installs.

Adds the PLAY_STORE_PACKAGE constant in prep for gating the Play flow on
it later, and uses it in getPlayStoreMarketIntent in place of the
hardcoded string.
Resolve the installer at init and only build the Play requestUpdateFlow()
pipeline when it is com.android.vending. Sideloaded/adb/other-store/debug
installs short-circuit to NoUpdateAvailable, avoiding the Play update API
call and its notification on builds that can't be updated through Play.

The installer is logged as debug in both branches.
@aveao aveao force-pushed the no-play-update-check branch from 8782c00 to 8d5c086 Compare May 22, 2026 18:08
@aveao aveao marked this pull request as draft May 22, 2026 18:08
@aveao
Copy link
Copy Markdown
Contributor Author

aveao commented May 22, 2026

Opened #210 for that. This PR now builds on that, so it's marked as draft until that's merged, feel free to undraft later.

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