How to restrict jurisdictional tiers using Google Play Age Signals checkAgeSignals() prompt?


I am upgrading to the version 0.0.4 of the Google Play Age Signals API.

According to the documentation there are now two methods to call to get signals status and age tiers.
requestAgeSignalsAccess(Activity) returns SHARED, NOT_SHARED, or VERIFICATION_REQUIRED
and
checkAgeSignals(AgeSignalsRequest) returns a Age Signal Response that returns a few things but focusing on ageRangeSource which returns Tiers of how they have verified

  • TIER_A: User has self declared their age.

  • TIER_B: User's age is managed by a parent or a guardian.

  • TIER_C: User's age is assessed by using credit card, email address, selfie assessment, Government ID, or Tax ID.

  • TIER_D: User's age is checked by using a combination of Government ID and selfie assessment, or Digital ID.

  • null: Returned when ageSignalsStatus is NOT_SHARED or VERIFICATION_REQUIRED.

For my app I am needing to have age verification for jurisdictions that require age verification like Texas. So if a user comes in and the requestAgeSignalsAccess(Activity) returns VERIFICATION_REQUIRED we can lock them out until they are verified or if they are under 18.

Also, in a scenario where a user is not in a state that requires age verification I am wanting to let them access the application regardless of age.

This is where my issue comes in. A user has previously shared their status so the requestAgeSignalsAccess(Activity) returns SHARED, but not in a state that requires age verification.

Is the best way to determine if it is needed to check their age, to expect that a TIER_C and TIER_D response would be from a jurisdiction that requires it and if it is TIER_A or TIER_B that those should be okay to just bypass without checking age?

Something like

ageSignalsManager.checkAgeSignals(AgeSignalsRequest.builder().build()) .addOnSuccessListener(ageSignalsResult -> { Integer ageRangeSource = ageSignalsResult.ageRangeSource(); if ( ageRangeSource == null || ageRangeSource == AgeRangeSource.UNSPECIFIED ){ ageVerificationResponse.put("status", "Unknown"); } else { if ( List.of(AgeRangeSource.TIER_C, AgeRangeSource.TIER_D).contains(ageRangeSource) ) { //then check upper and lower age bounds } else { //then okay not to check } ageVerificationResponse.put("status", "Verified"); } ... })
0
Oct 9 at 4:17 PM
User AvatarDavid B
#java#android#google-play#google-play-services

No answer found for this question yet.