Skip to content

Android Setup

GitHub
  • Android 7+ (API 24) baseline from the plugin
  • Runtime ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION in your host app
  • Google Play policy review if you block users solely based on developer options

The plugin merges coarse/fine location permissions into your app manifest. Request them at runtime before calling analyze().

  • Location.isMock / legacy mock provider flags
  • Developer options and USB debugging state
  • Installed packages such as com.imyfone.anytoandroid
  • Legacy mock-location permission holders on older Android versions
  • Emulator fingerprints and impossible movement heuristics
await MockLocationDetector.openDeveloperSettings();

This opens development settings when available. Apps cannot change the values for the user.

import { MockLocationDetector } from '@capgo/capacitor-mock-location-detector';
const result = await MockLocationDetector.analyze({
requestLocationSample: true,
additionalMockAppPackages: ['com.example.internal.mockgps'],
});