fake_gps_detector 0.5.1

Flutter Android

A Flutter plugin for detecting the emulator device and mock location / fake gps.

Fake GPS Detector, Emulator Device Detector #

A Flutter plugin for detecting the emulator device and mock location / fake gps.

Getting Started #

In your flutter project add the dependency:

dependencies:
  ...
  fake_gps_detector: ^0.5.0

Usage #

Importing package

import 'package:fake_gps_detector/fake_gps_detector.dart';

Permission src/main/AndroidManifest.xml

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

Using it

(ANDROID ONLY) Checks whether device is real or emulator

bool isMock = await FakeGpsDetector.isFakeGps;

(ANDROID ONLY) Can this device mock location - no need to root!

bool isEmulator = await FakeGpsDetector.isEmulator;

Note: #

Add a location permission request before calling the "isFakeGps" method, make sure it has been approved to access the location. For more details, please open the example directory

2
likes
70
pub points
36%
popularity

Publisher

andiksetyawan.dev

A Flutter plugin for detecting the emulator device and mock location / fake gps.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on fake_gps_detector