How to prevent user from using fake gps in Flutter Web (PWA) - flutter

I build a Flutter Web project, but I would like to know, is there a package that can handle user to prevent from using fake gps or mock location? for Android and iOS, there is package called trust_fall and trust_location to detect mock location.. how about package for Flutter Web? is there an available package for Flutter Web to detect mock location?

trust_fall depends on detecting jailbroken or SafetyNet failure, which isn't available for a webpage while trust_location credits LocationAssistant for the algorithm it use, which rely on Location.isFromMockProvider() that also unavailable for a webpage. You can use IP geolocation, but that's fraught with false positives from VPN use, and at most only accurate up to a city level.

Related

Is there a way in flutter to switch the screen off when i click a button?

I am trying to create an app launcher with flutter but failing to implement the functionality of turning screen of on double tap.
is there any package that can help me
You could use the flutter_app_lock package but what I'd recommend using platform specific methods to send your request from your flutter app to the system platform.
And if you want there's a package for sending requests too. The package is called Pigeon and you can find more about sending requests to android or swift in this link: https://docs.flutter.dev/development/platform-integration/platform-channels?tab=type-mappings-swift-tab

Liveness Detection in Flutter

I have an app for attendance that is based on a facial recognition system. I want to implement liveness detection or antispoofing. I found some models and solutions but none of these solutions work in offline mode (no internet mode). My app works in offline mode without internet.
I made my app in the Flutter framework and I am using ML Kit. If anyone has any idea how to do it or has any solution or code regarding this issue. It will be very helpful to me.
you have to use tflite dependency to achieve live face recognition in flutter.
you can use below link to refer more about tflite. which is using to recognize live camera faces.
https://pub.dev/packages/tflite
And for offline mode you have to implement PWA(progressive web app) to your flutter app. use below document to implement pwa to your flutter app.
Note : pwa only works with https. so you can make build your flutter app using firebase to make your app secured
https://medium.flutterdevs.com/progressive-web-app-flutter-62c7dea05fc5

How can I access device information without using packages in Flutter?

How can I access device information without using packages in Flutter? How can I get the information of the device where the app is installed in my Flutter app?
First, you'd be better off using packages. But if you really want/need to do it, you'd have to write platform-specific code code in the native language of the targeted platform (ie. Swift or Objective-C for iOS/Mac, Kotlin or Java for Android, etc), then use so-called platform channels to pass messages between your app and the platform-specific code.
If you'd like to get details about the device, on iOS you'd use UIDevice, on Android you'd typically want Build.
This can only be done through Method Channel

Is it possible to make mobile p2p app without a server?

What I want is to make a web/mobile app (I've chosen Flutter) that acts both as a host and as a client, so multiple instances of this app can share data without actual back-end (let's say the addresses of the devices are hardcoded into the app for the simplicity).
I can't use Firebase or Backendless, my app has to be the only host.
I've looked into socket.io, websockets, WebRTC and didn't find a solution.
So, is it even possible? With or without Flutter.
It is in theory possible, if you are planning to only use android you can use this library Flutter p2p which use wifi-direct (Android documentation) to discover devices and connect to them. It has some problems with newer environments but there is lots of forks from the git project that you can import. I've read that it should be possible to allow devices that doesn't support wifi-direct to connect if you create a group so maybe it could work for iOS if there is a hosting android device.

Flutter: Launch my other application from flutter application and get some data back

Using flutter to launch other applications on both the platform (Android/iOS). I know we can use url_laucher to launch applications like Gmail or Google map.
Can it also be used for launching my own application?
If "YES", is it possible to get some data back from my other application to flutter application?
If "NO" then is there any other way to do this. My goal is to get the data (like a simple string) back from my other app.
NOTE: Constraint is that I have to use flutter Widgets or packages and not touch the native directories.
Yes, you can use url_launcher to launch your own application provided your application has appropriate url schemes defined.
No, you cannot get back any data by launching an application with url_launcher
Is there a way to achieve this only using flutter widgets and existing plugins?
Yes, only on android. There seems to be a flutter_share plugin that allows you to share data to other apps and receive data shared by other apps.
Hope that helps!