Skip to content

erik-perri/android-call-filter

Repository files navigation

Call Filter

An Android app to reject calls from numbers matching various conditions.

Rule list Rule edit Log list

Build

Use Android Studio

Issues

  • On Android versions before Q (API v29) the app does not always get notified about a call to reject it before the ringer can start. This is fixed in Q with the CallScreeningService API.
  • On Android Oreo 8.0 (API v26) the app cannot block calls. ITelephony.endCall() strictly requires MODIFY_PHONE_STATE on this version. API v27 refactored TelecomService for the new public call APIs, which allowed the legacy reflection to work again.
  • On Android versions before Lollipop (API v21) the app must run as a system app to block calls.

Releases

Releases are automated via GitHub Actions. Pushing a tag matching v<major>.<minor>.<patch> (e.g. v1.2.3) runs unit tests, builds a signed release APK, and publishes it as a GitHub Release.

Build provenance is attested so you can verify an APK was built from this repository with the GitHub CLI tool:

gh attestation verify call-filter-<version>.apk -R erik-perri/android-call-filter

Testing

Unit tests run without an emulator:

./gradlew testDebugUnitTest

When running instrumentation tests via the Android Studio gutter, an emulator must be running. The can also be provisioned automatically using Gradle Managed Devices. Because the test libraries require a higher minSdk than the app itself, pass -PtestMinSdk=26:

# Run on a specific device (e.g. API 29)
./gradlew pixel2Api29DebugAndroidTest -PtestMinSdk=26

# Run on all configured devices (API 27, 28, 29, 35)
# We limit parallel devices to 1 to save local system resources
./gradlew allDevicesDebugAndroidTest -PtestMinSdk=26 -Dandroid.testoptions.manageddevices.maxparallel=1

To run tests on a physical device or a manually opened emulator:

./gradlew connectedDebugAndroidTest

License

MIT

About

Android app to reject calls from numbers matching various conditions.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors