Repository navigation
Conversation
0.0.4 removes userStatus; status is now derived from ageRangeSource + significantChangeStatus, the replacement Google names in its release notes, so existing status-based code keeps working. Follows the upstream rename of mostRecentApprovalDate to significantChangeApprovalDate and exposes the new fields on AgeSignalsResult and AgeSignalsMockData. New requestAgeSignalsAccess() implements the 0.0.4 two-call flow: it can show Play's age sharing prompt (the plugin now implements ActivityAware to present it) and gates checkAgeSignals() on a shared, notShared, or verificationRequired outcome. A decline is a result, not an error. iOS reports shared and keeps gathering consent inside the check itself, so one call sequence works on both platforms.
syntaxticsugr
left a comment
Contributor
There was a problem hiding this comment.
Went through the derivation change - the band-vs-gate verdict is right, no objections to the logic. The inline notes are all docs and examples the code moved out from under, plus one behavioural note on gate quantisation.
Happy for #34 to be closed in favour of this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates Android to Play age-signals 0.0.4. Google removed the
userStatusfield, so the status is now derived from what Play does report.This includes @syntaxticsugr's commits from #34, which is where the two-call access flow and the new result fields come from. On top of that it corrects the status derivation and adds docs and safety work.
The correction
#34 derived the status from the assurance tier:
tierC/tierDmapped toverified,tierAtodeclared. ButageRangeSourcesays how an age was established, not what it is. AtierDresult means an ID was checked, and that ID can read 12, so a minor could clear an adult gate. The reverse also held: a self-declared adult could never reachverifiedwhile the strongertierCpassed automatically.The verdict now comes from the reported age band measured against your highest configured age gate, which is the comparison the iOS side already made.
Breaking
statusis derived from the age band, not the tier. ReadageRangeSourcefor how the age was established.AgeSignalsStatus.declaredis deprecated and no longer returned. ReadageRangeSource == AgeRangeSource.tierA.mostRecentApprovalDaterenamed tosignificantChangeApprovalDate. The old name still works on the result, mock data, constructors andcopyWith, andfromMapstill reads the old channel key.useMockData: truethrows in non-debuggable builds. The fake manager forges age signals and should not be reachable in a release.requestAgeSignalsAccess()is a new first step; call it beforecheckAgeSignals()and only read signals onshared.Also
Refreshes the regulatory status (Texas is firmly in effect, Utah and Louisiana are delayed but Apple already shares age categories there, Singapore added), adds badges, and adds
llms.txtplus context7 rules.Testing
36 Kotlin tests, 75 Dart tests, analyze and format clean. Tested on a Pixel 7 with mock data.
The real Play path still needs a check on a US, Brazil or Australia account, since it returns
NOT_SHAREDhere. That is the one assumption the tests cannot settle:verifiedrequires Play to reportageLower >= 18for an unsupervised adult.