Developer QA Guide

Test Android Geofencing Without Driving Everywhere

Validating geofence triggers in physical vehicles is time-consuming, expensive, and subject to unpredictable cellular signal jitter. Learn how to simulate precise boundary crossings, dwell times, and perimeter hysteresis from your desktop browser.

Understanding Geofence Transitions

The fundamental events handled by Android's GeofencingClient.

Transition Event

GEOFENCE_TRANSITION_ENTER

Triggered when the device’s reported coordinate crosses from outside the defined circular or polygonal perimeter into the geofence region.

Transition Event

GEOFENCE_TRANSITION_DWELL

Triggered after the device remains inside the geofence boundary for a specified dwell delay (e.g. 5 minutes). Used to prevent rapid false positives from brief drive-bys.

Transition Event

GEOFENCE_TRANSITION_EXIT

Triggered when the device’s coordinate exits the geofence boundary, signaling delivery departure, customer checkout, or shift completion.

Testing Methodology

The 5-Step Desktop Testing Workflow

Follow this workflow to test your app's geofencing broadcast receivers without leaving your chair:

1
Locate Your Geofence Center in Mockery Controller

Search for the exact street address or enter latitude/longitude coordinates matching the geofence configured in your app's test environment.

2
Plot an Approach Trajectory

Click to place Waypoint A approximately 300 meters outside the geofence radius. Click to place Waypoint B directly inside the geofence center.

3
Start Simulation & Verify Entry Transition

Set speed to 30 km/h and click Start. Watch your Android Logcat: verify that your app’s BroadcastReceiver captures GEOFENCE_TRANSITION_ENTER the moment the simulated dot crosses the boundary.

4
Pause Simulation to Test Dwell Delay

Click Pause in the browser once the marker is inside the geofence. The Spoofer holds the exact coordinate in place. Let the clock run to verify your app’s dwell timer triggers without boundary drift.

5
Add Exit Waypoint to Test Departure

Add Waypoint C 400 meters away outside the boundary and click Resume. Thanks to Route Anchor technology, the vehicle continues smoothly without teleporting, triggering GEOFENCE_TRANSITION_EXIT cleanly.

Advanced QA Edge Cases

Boundary Jitter & Debounce Verification

In physical tests, noisy GPS readings cause location coordinates to rapidly oscillate across boundary perimeters (e.g. 99m inside, 101m outside).

Boundary Hovering Test

Use Mockery GPS Joystick to manually nudge your position across the perimeter line repeatedly. Verify that your app implements proper hysteresis (debounce filters) so users aren't spammed with multiple welcome notifications.

High-Speed Pass-Through Test

Set speed to 120 km/h across a small 50m geofence. Verify whether your app’s sampling rate captures the brief entry, or correctly suppresses dwell notifications as expected.

Start Simulating Geofence Tests Today

Set up Mockery Controller and run your first geofence crossing test in minutes.