Skip to content

Show where patterns and calls are from - #17

Merged
asulwer merged 2 commits into
masterfrom
place-names
Oct 21, 2026
Merged

asulwer merged 2 commits into
masterfrom
place-names

Conversation

@asulwer

@asulwer asulwer commented Oct 21, 2026

Copy link
Copy Markdown
Owner

Closes #13

Shows the place a pattern covers or a number comes from:

  • Patterns tab: under each pattern. For example, 602* shows Arizona, 876* Jamaica, +44* United Kingdom and +4420* London, United Kingdom. Nothing is shown when the pattern has too few digits to tell, such as 60* or *.
  • Calls tab: in each row's details, e.g. Oct 21, 10:47 AM · Arizona · matches 602*.
  • Test a number: e.g. (416) 555-0100 (Ontario, Canada) would ring: no pattern matches it.

How it works:

  • Uses libphonenumber-csharp 9.0.41, Google's offline geocoding data. No internet is needed; the app still requests no internet permission.
  • It runs only on screen. BlockerService never calls it, so screening speed is unchanged: 0–19 ms on the emulator.
  • The data is loaded in the background when the UI starts (PlaceNames.WarmUp), so the first screen doesn't wait.
  • For an area-code pattern, the code is filled out with the fake 555-0100 exchange. That way an area code resolves to its state or country, not to whichever town owns a real exchange.

Docs: README, docs/using.md, docs/patterns.md, and a Privacy note in docs/how-it-works.md.

Stacked on #16. This PR's base is edit-pattern-note, so the diff shows only this change. When #16 is merged and its branch deleted, GitHub retargets this PR to master.

Testing

  • 25 new unit tests in PlaceNamesTests; all 181 tests pass.
  • Release build (trimmed, x64) on the emulator:
    • Patterns tab shows Nigeria, London, United Kingdom, Arizona and Jamaica.
    • A simulated call from (602) 555-9999 was BLOCKED and shown as "Arizona · matches 602*".
    • A call from (416) 555-0100 shows as "Ontario, Canada".
    • Test a number shows the place.

🤖 Generated with Claude Code

Patterns, the Calls tab and Test a number now show the place a pattern
covers or a number is from ("Arizona", "Ontario, Canada", "Jamaica",
"London, United Kingdom"), using the offline geocoding data in Google's
libphonenumber. It's only used on screen, never while screening a call,
and is warmed up in the background when the UI starts.

Closes #13

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Base automatically changed from edit-pattern-note to master October 21, 2026 18:59
@asulwer
asulwer merged commit 091bf78 into master Oct 21, 2026
3 checks passed
@asulwer
asulwer deleted the place-names branch October 21, 2026 19:04
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.

Show where patterns and calls are from

1 participant