3

I currently working to make application attendance prototype, in this application i use google maps flutter. I want check if user enable developer option, because inside this have option to enable mock location. I want add more security to prevent user manipulate his location. If user detected actived developer mode , show dialog to turn off that.

Something Like this :

I have reference to make it with this link , but i'm not familiar with native code .

How can i approach this ?

Thank's.

Zeffry Reynando
  • 3,445
  • 12
  • 49
  • 89

2 Answers2

2

https://github.com/jeroentrappers/flutter_jailbreak_detection

import 'package:flutter_jailbreak_detection/flutter_jailbreak_detection.dart';

bool jailbroken = await FlutterJailbreakDetection.jailbroken;
bool developerMode = await FlutterJailbreakDetection.developerMode; // android only.

thanks to appmire.be

Peter Csala
  • 17,736
  • 16
  • 35
  • 75
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 19 '21 at 00:16
1

Use this plugin https://pub.dev/packages/flutter_jailbreak_detection

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  flutter_jailbreak_detection: ^1.8.0

Import it Now in your Dart code, and use it:

import 'package:flutter_jailbreak_detection/flutter_jailbreak_detection.dart';

bool jailbroken = await FlutterJailbreakDetection.jailbroken;
bool developerMode = await FlutterJailbreakDetection.developerMode; // android only